How to get PID Padameters for a "lowpass with integrator" process

Hello Peter,

I must "go back" to the measurement to determine the process parameters. You can see an measurement of the step respone at

formatting link
If you look at the sheet, you can see the step response of the motor with a inertia load (v-max = 19200) and with additional braking (v-max = 11000) This was the basics to suppose its a first order process (K/(1+p*T)

But now look at the impuse respone:

formatting link
The curve with the green rhombus has the same input strength as the step. While the impulse its the same curve as at the step with v-max =

19200).

But at the impulse end, the current is set to zero and you see the speed is decreasing linear. its really not a first order behaviour.

And if I reduse the Impulse duration to the half (curve with black circles) you see, that the response reaches in at the half time the state zero.

This is no first order behaviour. Both Impulses were significant shorter as the time constant, so they should reach zero araound at the same time.

If you look at

formatting link
can see the motor modell. The motor is a FOC stepper motor. The currents/voltages are sinusodial, but if you use instead the RMS- values, the model is the same like a dc motor with permanent magnets.

Look at first at Point II of the model: there ist the model with voltage input and speed output. The first element is a first order type for the rotor-current (stator current at the stepper). It has a very low time constant TA, which could be set to zero for this discussion. The current produces a drive moment (me). Of this driving moment the load is subtracted. The difference is the effective moment to the inertia, which is modelled as the integrator element with the time constant TI. Because the EMK of the motor, there is a feedback to the input voltage UA, where the EMK-part is subtracted. This model describes the motor which has a voltage as input. But the control of the motor has a current control. I medelled it at Point I. There you see, that the actual current is feedback and verified with the setpoint current. The current controller is drawn by the blanc element. It outputs the voltage UA in a way, that the requested current flows.

Now to the impulse behaviour: The input is the current. Its set to a certain value. This current produces a driving moment, where the load moment is subtracted and the difference accelerates the inertia. The motor speeds up as you can see at the diagram. At the end of the impulse the current is set to zero. Look at the modell. Zero current is reached, if the Voltage UA is at the same level as the feedback EMK. Thus, the drive moment is zero and the mechanical load is subtracted. The negative moment decellerates the inertia. If the load moment is constant (not speed dependend), the speed falls linear. This is exact, what you see at the impulse diagram at the falling section. But this is really no first order behaviour.

The consquence is, that I cant determine the first order model parameters by the impulse evaluation. The problem is, that I should have a solution which needs less turns of the motor, because if the motor is in the machine installed, you cant presume that the motor can run to get the parameters by the step response.

Do you know a solution to get the parameters with less space?

Regards

Wolfgang

Reply to
Wolfgang
Loading thread data ...

at

formatting link

The graphs make sense but is v-max the maximum velocity?. Counts/sec, mm/sec, rads/sec

This is a typical way motor systems excite their systems. The decreasing velocity doesn't appear to be exponential. This is odd. Are you sure you have any frictional loads removed?

I don't understand this statement. The green squares should be with

1% of 0 5 time constants from 120 ms. The black circles should be with 1% 5 time constants from 60 ms when the current is set to 0. Are you sure the graph doesn't have an offset?

But don't you have a load that makes the system time constant much longer?

Drive monemt == torque?. The Net Torque is divided by the inertia to get angular acceleration. I don't know what you mean by subtracted. The key is the Net Torque. The net torque is the torque caused by the current minus and frictional torque.

Do you have a current source?

Check out what I said above.

It is still hard to understand what you are saying. I understand the drive torque goes to 0 when the current goes to 0 and the system will coast to a stop depending on the damping and the static frictional torque.

The method you are trying to use is common. The way you do this is simple. You need to know 3 things:

  1. The time it takes to get to the peak speed. In this case it is either 60 or 120 millis3econds.
  2. You can tell from the graph how long it takes for the speed to drop to within 1% of 0.
  3. You need to get the peak speed from the graph. If you know how long 5 time constants is then you can calculate how many time constants the rise time is. If you know how many time constants it takes get to the peak speed on the graph then you can calulcate what maximum speed the motor would eventuall reach at full speed.

Yes, it is common for the ramp down to take a long time and possibly go too far when opeating in current mode. Without negative current there is no way of stopping except for friction. What I do a postive pulse and then a negative pulse of the same duration. The negative pulse stops the motor faster.

I will see if I have time to show an actual example. I have a motor that has a time constant of about 1 second that runs in torque mode. I don't like methods that depend on just a few readings. Everything depends on just a few points.

Peter Nachtwey

Reply to
pnachtwey

er,

8192 at the diagram is equivalent to 1000 rpm

At all graphs the motor was mounted to a brake. At the green rhombus line/black circe line (impulse 120ms/60ms; 0V at brake -> no braking force) the motor has to drive approx. only the inertia load.

At the red circle line/blue cross line (impulse 120ms/60ms; 5V at brake -> braking torque is active) the motor has to drive the inertia load and the constant braking torque.

So at the green/black marked line there may be only a little parasitic braking torque.

Its sometimes hard to explain complex themes only by written words. I will say it with other words.

  1. The difference of green and the black curve is the impulse duration: 120ms at the green one and 60ms at the black one.
  2. While the impulse is present, the accelleration is the same as at the step experiment, where the motor speeds up to 19200.
  3. At the step experiment we saw, that the time constant T is about
1s.
  1. Back to the impulse: So while the impulse is present, the speed rises in a "linear" way, because 120ms are less T (=3D1s). That is ok
  2. Now we look at the behaviour after the impulse. The motor current is reduced to 0. If the process now has furthermore a first order character, the speed must not fall linear. At first, the gradient must be strong and later the gradient reaches about zero. And: Independent of the starting value, after 5 times T the speed must reach about zero. But look at the impulse response after the impulse finished: The green and black line falls nearly linear. And because they falls linear, the green line needs more time after impulse finish to reach 0 as the black line. At a first order system, the time to reach "0" must be constant independent of the signal high. Furthermore the green line needs significant less as 5*T to reach zero. That means: At the whole step experiment or at the impulse experiment while the impulse is present, a first order behaviour is viewable. But at the impulse experiment after the impulse, the behaviour is not like a first order system.

And there I ask myself, if I determine the PID-Parameters with the behaviour ot the step experiment, get I than the correct parameters, if the behaviour at the impulse experiment (after finishing the impulse) is not a foirst order behaviour?

Look at ma modell: The first element (1/1+p*TA) is the modelled first order behaviour of the current. This time constant is very less (about 1ms) and has no importance for this discussion. The inertia mass is part of the Integrator

1/(p*TI) and determines the value of TI. If TA is much less than TI then the transfer function between the voltage us and the speed n (look at the modell at point II) is 1/(1+pTI). that means that the behaviour of a voltage controlled motor is like a first order system and the time constant TI is determined by the mass inertia.

Yes

Yes. We mean nearly the same. The current produces an electrical torque. Now think at the motor axis is a wheel with a wraped rope ant at the rope is fixed a weight. This produces a load torque. If you define, that if the load torque works against the electrical torque, the load torque has a positive value and if the load torque works in the same way like the electrical, the torque load has a negative value, than you must subtract the load torque from the electrical torque to get the effective torque. If you have an additional friction, this value must further also be subtracted. ANd the effective rest is your net torque.

Think about: You have a electrical torque from the current (which can also be zero), you have a mechanical load torque as by the wheel with weight (which can be zero) and you have a torque by friction (which can be zero and speed dep.) This three torque types are different and all must be considdered. That is done by my subtraction.

The motor is controlled by a Allegro A3985 motor driver. And the input value of this IC is the current.

What I want to say: At the step experiment - the input is the current which is set to a fix value, the output is the speed - I see a first order process behaviour. At the impulse experiment, if I look at the decreasing speed - I see no! first order behaviour. I understand the behaviour if I look to the drawn modell. And what does this circumstance mean for determining my PID- Parameters. If I determine the process-parameters with the step experiment, I can determine the PID-Parameters. But will fit this PID parameters, because if I look at the impulse experiment after finishing the impulse, I dont see the behaviour of a first order process.

Thats the point: this time depends of the peak speed. At a real first order process, this time is constant, independent of the peak speed! And therefor I cant determine a reasonable time constant with the impulse experiment. Evaluating the impulse respone I never come to the time constant of 1s as by the step experiment!

It would be very interesting: If you input a current impulse - I believe you will have the same bahaviour (if you input a regulated fix current for the impulse, not a fix voltage).

Yes - you are right - but for me its now importand to principile of the whole. I know that a method which is based on an integral behaviour is much stable as one which evaluates a few points of a response.

Wolfgang Weinmann

Reply to
Wolfgang

Hello Peter,

for better understanding of the falling curve of the impulse-response, I modelled the motor in scicos. And now I understand the behaviour. Responsible for the shape is the speed independent load torque. My modell is adjusten in a way, that I have the same behaviour as at a real run. If you are interested, I will send you the scicos modell.

Wolfgang

Reply to
Wolfgang

I am glad you found out why the response looked the way it did. It looked to me like the response was exponential but decaying to an offset other than 0 as if you had another active load. You should also plot the control output to the motor.

I will look at it your Scicos file. I have never used Scicos, just Scilab, but I am willing to give it a try.

BTW, I agree with your comments about the documentation. I am looking into new tools like perhaps Python or Java augmented by a graphing package and math library. I have found the new release of Scilab to be so buggy that I just can't get behind it anymore.

I did buy software to do video captures of my screen and audio but I found out that my test system had been 'modified'. I need to get my system put back together. It did look like this. ftp://ftp.deltacompsys.com/public/Pictures/Motor%20test%20system.JPG It is just two DC 200 watt motors running in current mode as yours are. Then I will be able to play too and make some vodcasts.

Peter Nachtwey

Reply to
pnachtwey

Wolfgang, I am about to do a first on this use group. I am posting a link to a vodcast about how we do auto tuning. Notice that the open loop control signal doesn't need to be a pulse or a step. I can use just about any control signal I want. The real trick is how the data in the graphs is processed.

The video is about 30 MB because I needed to use 1280x720 HD so the numbers on the screen can be seen. This is my first crude unscripted vodcast. Download the video first and then play. Otherwise the parts of the screen that are changing will be blurry when limited by internet speeds..

ftp://ftp.deltacompsys.com/public/videos/AutoTuneMotor.mp4

Notice that I still think in terms of hydraulic systems using terms like extend and retract. It is hard to talk intelligently for 15 second let alone 7 minutes. I will work on making scripts in the future.

Peter Nachtwey

Reply to
pnachtwey

It has come to my attention that QuickTime is required for view the file.

ftp://ftp.deltacompsys.com/public/videos/AutoTuneMotor.divx Can be viewed using VLC. I am still experimenting with the best compression methods DivX seems to be the best so far.

Peter Nachtwey

Reply to
pnachtwey

PolyTech Forum website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.