cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - You can Bookmark boards, posts or articles that you'd like to access again easily! X

Translate the entire conversation x

Need a resonance lock control to use with rkfixed solver

ptc-3172392
1-Visitor

Need a resonance lock control to use with rkfixed solver

Greetings All,

I've written a model of a nonlinear mechanical system that uses the rkfixed solver. The system is driven at its mass-spring mechanical resonance but has a very nonlinear spring. As expected with a nonlinear spring, the resonant frequency changes with displacement amplitude (a so-called hardening nonlinearity).

The challenge is to get the model running at high drive amplitudes. Like the real product's start up, the displacements begins at low amplitude and increase over a number of cycles as energy is stored in the mass-spring resonance. Also like the real product, as the displacement amplitude increases, the resonant frequency shifts due to the nonlinear spring. So obviously driving the model at a single frequency will not allow the model to reach the high amplitude state.

In the actual product there is a controller that keeps the drive frequency locked to the mechanical resonance as the drive amplitude is increasing. I need to implement a similar "resonance lock" control scheme in MathCad. So the control must be able to look at the state variables while rkfixed is running in order to keep the drive frequency locked to the shifting resonance frequency.

One approach would be to use a phase locked loop type control that measures the phase between force and velocity and then makes changes in drive frequency to maintain a zero (or near zero) phase. But I'm not aware of any functions in MathCad that can measre the phase between two dynamic state variables while the solver is running.

Any info on appropriate functions or alternative approaches would be greatly appreciated.

Thanks!

Tim Lucas

19 REPLIES 19

Hello!

Please, attach your Mathcad worksheet. Which version of Mathcad are you using?

Hello Vladimir,

I'm using MathCad 14.0. I can't send the worksheet since it's company proprietary material.

In my post I reduced the problem to the form of a mass-spring oscillator with a nonlinear spring to enable a generic discussion. If you have suggestions for solving that problem then I could apply them to the real worksheet.

Thanks

Hello Vladimir,

I'm using MathCad 14.0. I can't send the worksheet since it's company proprietary material.

In my post I reduced the problem to the form of a mass-spring oscillator with a nonlinear spring to enable a generic discussion. If you have suggestions for solving that problem then I could apply them to the real worksheet.

Thanks

Hello Vladimir,

I'm using MathCad 14.0. I can't send the worksheet since it's company proprietary material.

In my post I reduced the problem to the form of a mass-spring oscillator with a nonlinear spring to enable a generic discussion. If you have suggestions for solving that problem then I could apply them to the real worksheet.

Thanks

Can you not replicate the problem using non-sensitive data?

Mike

Mike,

Sure I think that's doable. I can write a rkfixed solver for a simple mass-spring resonator with a nonlinear spring. this should exhibit the required behavior where the resonance frequency changes with mass displacement amplitude.

I'll give it a shot, although I'm not seeing where to attach files.

Thanks

On the top right hand of the reply box, select ''Use advanced editor', this then takes you to the old style message box and allows you to uploads documents.

Mike

I see it thanks

The file "mass spring oscillator" is attached.

With the current inputs the resonant frequency is 159Hz. The constant J controls the strength of the springs nonlinearity. Set J=0 and the spring is linear.

With J=0 the resonant frequency does not change with drive amplitude. The input A controls the amplitude of the forcing function. Note that resonance is defined as zero phase between force and velocity (there's a graph of force and velocity to indicate resonance).

Set J=10 and you can study the resonant frequency f dependance on drive amplitude A. Increase A in steps and adjust f to find resonance at each step. With J=10 you can never quite get to the true resonance frequency at high drive amplitudes. The difficulty of getting to resonance is increased with hgiher values of J (i.e. stronger nonlinearity).

I think this model accurately depicts the behavior of the more complex system regarding the need for a resonance lock controller.

To provide a resonance lock control, frequency apparently must become a state variable. Then the phase between force and velocity must be measured in order for the shifting resonance frequency to be calculated while rkfixed is running.

Thanks for taking a look.

You can set up rkfixed to solve for differnt values as a function. See attached.

Fred,

Thanks for the suggestions ... not sure I understand how your solution works but I would like to understand more about the approach. I noticed that in D the 3rd state equation (for omega) is set to zero. Doesn't this prevent omega from changing?

Just to be clear, the goal is for the system to find it's own resosnance while rkfixed is running. The resonant frequency is amplitude dependent due to the nonlinear spring. During the start up transient phase the amplitude is increasing so the resonance frequency is also increasing. In the version you attached, the self determining frequency behavior does not appear to be there.

To see the nonlinear dependence of resonant frequency on amplitude you have to set J = 10 or higher for examaple.

Fred,

I'm working on a potential solution. I would like to be able to input a forcing function (a pulse of a given shape) from a table once per cycle and have that pulse triggered by a logic expression in the state equations (triggered for example by a zero crossing of velocity).

Do you know of an approach/function for using fixed data from tables as inputs into the rkfixed solver?

Tim Lucas wrote:

Fred,

I'm working on a potential solution. I would like to be able to input a forcing function (a pulse of a given shape) from a table once per cycle and have that pulse triggered by a logic expression in the state equations (triggered for example by a zero crossing of velocity).

Do you know of an approach/function for using fixed data from tables as inputs into the rkfixed solver?

I'm not sure how to do that.

I've been looking at FFT's of these signals, It looks like in addition to non-linearity (J) and amplitude (A), this is also frequency dependent-- if we solve for the resonant frequency and shake at that frequency, there's a new resonant frequency!

good luck.

(We're adding constants to s and D by inputting 0's into D (remember, the terms of D are the derivatives of s.)

Started over, same problem, looking at FFT's of solutions. Some interesting results, maybe not on point.

Last plot is very slow!

Interesting work with the FFTs. I can put the frequency sweep routine to work.

As far as being on point, obviously FFTs tell you the frequency after the fact while the challenge is to keep the system (a resonant compressor) running at its resonant frequency so you can use the model for design and optimization. The compressor needs to run on resonance so you can look at pressure, flow, efficiency, etc and do optimization. Gas is a very nonlinear spring ... thus the need for a resonance lock controller.

I've had some sucess with using the velocity zero crossing to trigger a force once per cycle. This is done with logic statements in the state equations. This allows the system to find its own resonance. An FFT tells you after the run what the steady state frequency was. See attached. You can crank J up and down and see how it finds and runs at the resonant frequency. Very stable and fast.

But using this approach in the real compressor model requires triggering not just a simple pulse but a currrent waveform. Still scratching my head on that one. Is it possible to call a vector of data (my current waveform) into the state equations while rkfixed is running? I would use the same zero crossing logic trigger. If so, then what function is used for this and how does the vector of data sync up with the time increments running in rkfixed?

Another conceptual approach is to have the currentwave form equation [i.e. current as a function of time i(t)] in the state equations, but then the problem is time. Once you trigger the current pulse you need to set t=0 to get the proper waveform (imagine the first half of a sinusoid). But I do not know of any functions in MathCad that allow you to create another clock that can be reset to zero while the rkfixed in running. Sometimes you can find a clever combination of functions to get the job done. Any ideas?

Thanks

You can add a current equation to trigger force.

take a look

Yes but your model is forcing the system to run at a predetermined frequency. It needs to be able to find it's own frequency (like the last model I posted) AND be able to call up a current pulse (not a continuous waveform) of a predetermined shape at the time the logic function calls for it.

Tim Lucas wrote:

Yes but your model is forcing the system to run at a predetermined frequency. It needs to be able to find it's own frequency (like the last model I posted) AND be able to call up a current pulse (not a continuous waveform) of a predetermined shape at the time the logic function calls for it.

Try this:

Vladimir,

That's strange. I'm thinking that maybe we have different MathCad versions and this is a translation error.

I've attached a screen shot of what you should seee when you open the work sheet.

You will see that "N" is defined and "D" is the state equation matrix but there is no Smin.

Announcements


Top Tags