PWM circuit to control hydraulic proportional valve - Page 1
Forum section: electronics / projects

author: IDEngineer
author_rank: Super Contributor
timestamp: August 02, 2020, 10:19:03 pm
content: I've searched the site and found a few references (such ashttps://www.eevblog.com/forum/projects/proportional-valve-control-with-npn-transistor-(tip-120)-using-pwm/msg3087566) but no real discussions of any better or worse circuits for controlling a proportional valve.It's a solenoid (actually, two) but unlike most solenoid applications you need to control its position linearly as opposed to just bang-bang on/off. Most discussions of solenoid drivers seek to optimize for pull-in vs. holding current vs. heat dissipation, where a short-term greater current is used for pull-in and then a lower current can be used to hold the solenoid in the pulled-in position. Proportional valves typically use PWM to achieve linear control, with the frequency set low enough to act as dither to improve hysteresis response. 150-200Hz is common.The obvious and traditional approach would be a suitable FET, either high or low side, with a flyback diode. But before I commit to this I wonder if someone has devised a more optimized driver circuit for this rather specialized situation.Thanks!

author: oschonrock
author_rank: Regular Contributor
timestamp: August 02, 2020, 10:45:10 pm
content: Quote from: IDEngineer on August 02, 2020, 10:19:03 pmSorry, link not working for me.

author: OM222O
author_rank: Frequent Contributor
timestamp: August 02, 2020, 10:49:04 pm
content: I'd personally go with constant current circuit. If you need high effeciency then also add a buck converter that adjusts it's voltage with respect to the load, otherwise just strap on a heat sink and fan. If you provide more details I can draw up a schematic.

author: IDEngineer
author_rank: Super Contributor
timestamp: August 02, 2020, 11:01:04 pm
content: Quote from: OM222O on August 02, 2020, 10:49:04 pmI considered that but we already have a closed control loop so we don't have to control based on current. This is a hydraulic motor application and we have RPM sensing, so even if conditions change we can vary the pulse width to maintain the target RPM. If you have a different reason for current management, I'm all ears! But otherwise I think we just need to have PWM control into the coil... the question is whether there is a better way than the traditional FET+flyback diode.

author: OM222O
author_rank: Frequent Contributor
timestamp: August 02, 2020, 11:19:59 pm
content: If you want to go the PWM route then no.But the constant current method allows for closed loop control and reliable operation automatically without needing fancy control algorithms / feedback. You mentioned a proportional valve (coil + magnet that changes the flow rate) but then you mention a motor and RPM control? Those are two completely different things? The pump creates a certain amount of pressure, resistance to that pressure determines the flow (just like voltage (pressure) and current (flow))

author: David Hess
author_rank: Super Contributor
timestamp: August 02, 2020, 11:30:50 pm
content: There are three things to decide:1. Whether to use voltage control like you suggest, or proportional control of the current with local feedback.2. Whether to use a transistor and diode, half-bridge, or full-bridge.3. An LC filter can be added between the switching circuit and solenoid so that it is driven with DC rather than low frequency PWM. This combines the efficiency of PWM with a linear drive signal.

author: xavier60
author_rank: Super Contributor
timestamp: August 03, 2020, 12:32:00 am
content: I have some experience with these,https://www.eaton.com/ecm/groups/public/@pub/@eaton/@hyd/documents/content/pll_2139.pdfI have seen a bought PWM current controller use a UC3843 driving a MOSFET.

author: IDEngineer
author_rank: Super Contributor
timestamp: August 03, 2020, 12:34:25 am
content: Quote from: David Hess on August 02, 2020, 11:30:50 pmInterestingly, the pulsed nature of the PWM signal is an advantage with proportional valves. This is why I said "frequency set low enough to act as dither to improve hysteresis response" above. The valves tend to have a certain amount of "stiction" if held in a single position for a while, so the manufacturers recommend that the PWM signal be of a low enough frequency to induce dither - thus causing the valve to mechanically move a bit. This improves response to small changes. Thus we don't want to use an LC filter, we actuallywantthe actuator to experience the "AC" of the PWM signal. The nonzero mass of the actuator obviously prevents it from responding to the electrical rise/fall time.Also, for a bidirectional motor application, there aretwosuch proportional valves with two separate solenoids. You don't have a midpoint (such as 50% PWM duty cycle) and drive it up or down, you drive one coil from 0-100% for clockwise rotation and the other coil 0-100% for counterclockwise rotation. The two coils are never actuated at the same time.

author: IDEngineer
author_rank: Super Contributor
timestamp: August 03, 2020, 12:36:15 am
content: Quote from: xavier60 on August 03, 2020, 12:32:00 amYes, precisely like those Eaton units (although we will probably be using Comatrol, but they are so similar that they may be physically interchangable). Two such solenoids per bidirectional proportional valve assembly.

author: IDEngineer
author_rank: Super Contributor
timestamp: August 03, 2020, 12:38:46 am
content: Quote from: OM222O on August 02, 2020, 11:19:59 pmThere are external forces at work on the load being driven by the hydraulic motor. Thus the current flowing to the coil may not represent what is really happening at the motor shaft. Hence the RPM sensing... if the load varies our firmware closed loop can optionally increase the PWM duty cycle to compensate, and vice versa. Any purely electrical approach won't know about the physical environment of the motor because the coil isn't coupled to the motor (neither inductively, nor electrically). It controls the valve but downstream losses mean you cannot rely on a 1:1 relationship.

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 03, 2020, 02:52:26 am
content: Quote from: IDEngineer on August 03, 2020, 12:34:25 amFor that case, you can connect the coils in series with diodes in parallel with each one. Then it can be driven with a H bridge. Probably doesn't save on component cost, but it does cut down on the number of wires required.

author: IDEngineer
author_rank: Super Contributor
timestamp: August 03, 2020, 06:57:13 am
content: An H-bridge would require four active components. Just driving the two solenoids individually requires only two. And the two coils each have either flying leads or integral two pin connectors so there will be four wires no matter how they're connected.So far it's sounding like a traditional FET plus diode is the simplest and most straightforward circuit. Two FET's and two diodes, done.

author: David Hess
author_rank: Super Contributor
timestamp: August 03, 2020, 01:34:39 pm
content: Quote from: IDEngineer on August 03, 2020, 12:34:25 amAn LC filter can make the output DC without preventing controlled variation. Think of an class-D audio power amplifier with has an output bandwidth of 20 kHz so the driving waveform can be precisely controlled.I have had problems in the past with hysteresis losses in steel cores when the switching frequency was too high.

author: IDEngineer
author_rank: Super Contributor
timestamp: August 03, 2020, 03:17:59 pm
content: Quote from: David Hess on August 03, 2020, 01:34:39 pmI do understand the point you're making. And I guess we could tune LC values to "round off" the corners of the PWM signal if desired. My point is that it's unnecessary and could even be counterproductive. The valve wants to "oscillate" (mechanically dither) a bit around its set point to overcome the static friction inherent in such devices. Quoting the Comatrol specs: "An advantage of a PWM signal is that the dither it provides significantly reduces hysteresis. Comatrol recommends using a 100-200 Hz dither for best performance."Other manufacturers openly state that if you are using a constant current, you should impose a small AC component to impart dither. For PWM systems you get that "AC" component for "free" by not electrically filtering it. That's why they recommend such a low PWM frequency, because much above that range the mass of the valve can no longer mechanically respond and you lose the dither effect.

author: artag
author_rank: Super Contributor
timestamp: August 03, 2020, 04:46:54 pm
content: You may find you get better control by using two loops : a fast one controlling the valve current / PWM fraction against pressure, and a slower one controlling pressure demand against RPM.Also, think carefully about what you're actually controlling. In many cases, mechanical control is not direct but there is an implied integration or differentiation in the mechanical loop. Ignoring this mucks up your stability criteria.The valves will likely have a long dead zone, a fairly fast change from fully on to fully off, and then a long dead zone at the other end. Make sure these dead zones don't cause integrator windup or other saturation effects. Don't rely only on the integrator to get them into the working zone.I've done this with both solenoid valves (Rexroth - clutch control of a rally car) and Moogs (F1) and they both worked (and won races). The Moogs are better but more expensive and very fussy about contamination. The valves are horribly nonlinear but you can get around that with software.

author: IDEngineer
author_rank: Super Contributor
timestamp: August 03, 2020, 06:35:55 pm
content: Excellent points, thank you!I do expect things to be "less than linear" especially at the extremes. Another reason for the truly closed loop control, where we're measuring theactual results(RPM) and not presuming everything "just works" in the middle. A canned solution wouldn't work for this application anyway, but a lot of them just presume if they control the current that everything will just work out. Trouble is, there's a whole real world out there that often has other ideas. {grin}

author: Andreas
author_rank: Super Contributor
timestamp: August 03, 2020, 08:08:40 pm
content: Hello,I am wondering if you are using current feedback to the control loop like in AD8203 datasheet.https://www.analog.com/media/en/technical-documentation/data-sheets/AD8203.pdfUsually this gives you a average value for the position of the valve.If you have many power stages you might want to have a dedicated power stage controller with current sensing for hysteresis controlled PWM like the MC33816AE.https://www.nxp.com/docs/en/data-sheet/MC33816.pdfwith best regardsAndreas

author: David Hess
author_rank: Super Contributor
timestamp: August 03, 2020, 10:10:44 pm
content: Quote from: IDEngineer on August 03, 2020, 03:17:59 pmYou asked for discussion so I provided some.As you point out, the class-D implementation would have to have the dither signal applied while the PWM implementation gets it for free, but it could also be adjusted in frequency and amplitude and even shape.What might make a class-D implementation competitive is that integrated class-d audio amplifiers are available.

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 03, 2020, 11:31:33 pm
content: Quote from: IDEngineer on August 03, 2020, 06:57:13 amH bridges are commonly available integrated into a single chip, including level translation required to work with 5V and 3.3V logic. Also, if the valve assembly is located in a separate module from the control system, going from 3 wires in the cable to 2 can be quite significant.

author: IDEngineer
author_rank: Super Contributor
timestamp: August 04, 2020, 12:49:54 am
content: Quote from: David Hess on August 03, 2020, 10:10:44 pmTrue. I'll check into that. Hard to beat the simplicity and low parts count of an NFET and diode. Possibly also a smaller NFET to improve gate drive on the larger transistor, though at these frequencies one of the beefier MCU I/O pins may still yield decent edges.

author: IDEngineer
author_rank: Super Contributor
timestamp: August 04, 2020, 12:57:17 am
content: Quote from: NiHaoMike on August 03, 2020, 11:31:33 pmIn this case, the Hall switch that detects RPM will be on the same PCB as the MCU and valve drive circuitry. One small PCB, mounted under the shaft with its integral magnet. So the valve will be physically right next to the PCB and there's little savings in cable length to enjoy.

author: Circlotron
author_rank: Super Contributor
timestamp: August 04, 2020, 01:17:14 am
content: Maybe a plain old UC3843 SMPS PWM current mode controller driving a single mosfet might be the answer. It does work with peak current, not average though, so whether that makes a difference.https://www.ti.com/lit/ds/symlink/uc3843.pdf?ts=1596503627351&ref_url=https%253A%252F%252Fwww.ti.com%252Fproduct%252FUC3843

author: NiHaoMike
author_rank: Super Contributor
timestamp: August 04, 2020, 01:18:46 am
content: Quote from: IDEngineer on August 04, 2020, 12:49:54 amAt such a low frequency, you should be able to just use some logic level MOSFETs.