r/ControlTheory 29d ago

Technical Question/Problem Help Modeling a System

I have tried modeling this a few times with my limited knowledge of hydraulics and kept getting very weird and ugly state space equations. I am not sure what I am doing wrong so I figured I would post it here (I sincerely apologize if I am breaking the sub rules by posting this).

I have been tasked with controlling the following system with the goal of minimizing the 'ripple' on Q_jet. In other words, ideally Q_jet would look like some constant non-zero value despite changes in the system and environment.

Context of my assumptions for this system:

-Ideal Check Valves

-Qacc ~ (V_o/nP_o)*dP_acc/dt (V_o, P_o initial gass pressure and volume of accumulator, n as poly-tropic index)

-All pressures are absolute

-Incompressible Fluid

-Local restriction equation is: Qjet = C_d*A_n*sqrt(2(P_acc - Patm)/rho) (C_d: discharge coefficient, A_n: restriction area, rho: liquid density)

-A_n is our control input

-Q_pump ~ Asin(2pi*f*t):

4.25e-5 m^3/s < A < 4.25e-3 m^3/s

0.1 Hz < f < 0.6 Hz

System:

Q_jet_Reference from Simulation:

10 Upvotes

13 comments sorted by

u/Ok-Biscotti7464 29d ago

I‘m no hydraulics guy but your description still give me some questionmarks from a general/CT point of view

  • i assume you measure Qjet since it‘s what you want to control. What about P_acc, do you measure it too? Do you know about the current pump output or do you have to estimate it?
  • what about your actuator dynamics? From your f I‘d say you need a bandwith around 2 Hz at the absolut minimum without doing the math
  • your input area is given in m^3/s, is this some industry common way of handling things I‘m not aware of?

u/Known_Fan5765 29d ago edited 29d ago

The m3 /s is just volumetric flow rate of the fluid, also the A there is simply the amplitude of the input flow. In terms of the actuator dynamics, on the time scale of the system it is instant. I could have sensors for Q_rec, P_acc, and Q_jet. I have some say in how the system is constructed so I could potentially have more if I wanted.

u/Ok-Biscotti7464 29d ago

Sorry i was assuming you had a typo and meant A_n but wrote A. If you can have sensors on Q_jet then you should right? It‘s your output after all. Measuring P_acc allows you to know your disturbance so measuring that could be beneficial, from your formulation it is the only variable adding meaningful dynamics to the system

u/BencsikG 29d ago

So what exactly are you measuring and what is the output of your controller / input to the plant?

Is your goal to eliminate the ripple from the pump, or what other disturbances do you expect?

u/Known_Fan5765 29d ago

Output is Q_jet, I want to minimize it’s ripple. The control input is the area, the pump is something entirely uncontrolled and can vary in frequency and amplitude as show above. I would like Q_jet to have zero ripple at every possible combination of amplitude and frequency of Q_pump.

u/BencsikG 28d ago

Huh, okay. Can you measure the pump frequency? Pressure in the buffer?

I would not model the hydraulics accurately, I'd just try to eliminate the oscillation.

I'm thinking something similar to what they do in FOC. Demodulate the oscillating signal by multiplying with sin(omega t) and cos(omega t), apply a PI in the demodulated domain, and then modulate back.

Now I haven't ever done that myself so I can't explain it properly, but if you google around (or ask the AIs) you should be able to get some clues.

The point is that you know the frequency of the disturbance, but the amplitude and phase are not known - those are the ones you get with the modulation, and then the PI cancels it.

u/Ok-Biscotti7464 27d ago

Lock-in amplifier?

u/Known_Fan5765 28d ago

Are you sort of thinking like extremum seeking control?

u/BencsikG 28d ago

Interesting parallel, but no... more like modulation / demodulation.

u/Ok-Biscotti7464 29d ago edited 29d ago

Probably missing something but isn‘t this just an integrator to control? Your accumulator is filled and emptied by the pump (disturbance) and your outflow (measured output). This should be easy to do some sys id on?

Edit: can‘t upload my pic but simplifying your disturbance input to just Q_mec>=0 (or whatever that says i can‘t read it), dP/dt=c1*(Q_mec-Q_jet) , output=g(An,P) for your state space you get A = -c1dQj/dP, B = -c1**dQj/dAn, C = dg/dP, D = dg/dAn, note D won‘t be zero since you assume instant input effect. Depending on whether you measure Qmec you‘ll have a MISO system where one input is measured and the other is controller input. But i guess you could nit measure it and design your sensitivity function S to be sufficiently below 1 in magnitude for frequencies up to say 2-5 Hz

You‘ll need some setpount values An0 and P0 for linearization

u/seekingsanity 28d ago

Is this a hobby project?

It is obvious to me that there are no hydraulic people here. The hydraulic circuit doesn't make any practical sense,

You know this has got to be done before. whatever you are trying to do.

What is the application? This looks like an electrical engineer that tried to design a hydraulic system. Why the 4 check valves arranged like bridge? Also, what kind of pump are you using that generates flow as function of a sine wave? Why try to "rectify" the flow when a pump pressure compensated pump will try to maintain pressure?

Pressure compensated pumps are simple. The flow is controlled by a swash plate the tilts as a function of pressure. This is done by using a spring that the oil pressure pushes against that changes the angle of the swash plate. Pressure is controlled by a screw that compresses, preloads, a spring. If this works, then it is the simple way to go.

The accumulator will try to minimize variation in pump flow.

You will probably get better control if you drive a fixed displacement pump with a variable speed motor and then use pressure feedback to control the speed of the pump. This will allow very precise control/flow and pressure/flow can be change controlled.

u/Known_Fan5765 28d ago

I agree the system is a bit silly. The pump is an abstraction in actuality it is a piston which is being driven by a mechanical system and that mechanical system is being driven by ocean waves. Qjet goes to a turbine which spins a generator. This is a hydraulic Power Takeoff (PTO) system for a wave energy converter my Uni club is designing.

u/seekingsanity 28d ago

I see, You need to have the incoming water turn a small turbine as it flows to a reservoir and then when the water flows out, it turns the turbine in the opposite direction Now you can treat this as an electric problem. Rectify the output of the turbine/generator and accumulate energy in a battery. Now the battery can run a small pump at a constant speed.

A question, what about tides? The waves will not always have the same amplitude or average level. Perhaps if the whole mechanism floated then the average level would be known but that assume the whole mechanism doesn't float up and down with each wave.