PID Timing interval

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

PID Timing interval

1,654 Views
binukannur
Contributor III

  Hai all,

      I designed an  IC engine controll unit for Hybrid Electric Vechile(HEV). The engine speed controlled by engine throttle valve.The throttle valve of engine is controlled by stepper motor with calculated PID value.In my test condition , I choose 1 second time interval for PID calculation, it also fine.When I used lesser time such as 100 ms, 250ms etc there is a large scale oscillation when  there is a small deflection. My engine rpm is nominal 2000 ,and maximum 2500 rpm.

In this application , there may be a sudden change in voltage drop via torque change. So  we can't choose a much long time for PID calculation.

 

Then how can I solve these situation?

Labels (1)
0 Kudos
Reply
8 Replies

1,295 Views
iggi
NXP Employee
NXP Employee

Hi,

you didn't specify what exact IC do you use. What's the part number?

Anyway, the question is application related so an MC expert would have to be involved here and review this topic.

0 Kudos
Reply

1,295 Views
binukannur
Contributor III

Hai,

      Right now we are using MC9S08DZ128CLL . This is a 8 bit controller. Here engine power is 5kw.

The hall effect position sensor Alligro ATS627 is used for rpm measurment. The 8 bit controllers can be replaced by 16 bit DSC controller if there is a problem with 8 bit controller.

0 Kudos
Reply

1,295 Views
iggi
NXP Employee
NXP Employee

So, you are in a wrong space here on community. It is 16-bit, but S12 and MagniV family only.

I will move this thread to 8bit space.

Also, there is the DSP space where you can ask any question.

0 Kudos
Reply

1,295 Views
binukannur
Contributor III

Hai,

     In this case micro controller is not a problem.It may vary. Any controller can be used.

I want only the concept about the PID timing.

0 Kudos
Reply

1,295 Views
kef2
Senior Contributor V

How long does it take to drop rpm from max to idle? 1s? 1/2s? You should calculate PID at least 10x faster than that. More faster means better accuracy and better reaction to sudden change of load. If you have problems with faster rate, then it must be something wrong with implementation, with anti-windup, with PID constants, with noise filtering for D-term.

0 Kudos
Reply

1,295 Views
binukannur
Contributor III

Hai,

      In my case IC Engine is controlled through throttle valve. Throttle valve  can move even faster than 1 seconds to max and minimum , but I think it is not good for sudden start and sudden stop.

My condition is , when I reach 2000 rpm, I want to maintain in this range.Here I check 100 ms,250 ms,  500 ms, 600 ms 1 sec. But when goes to below 500 ms , there is a significant oscillation.So I choose  600 ms now.

IC Engine is a mechanical device, and it has a moment of inertia so I think it is not good for very small time intervell.

What is your suggestion.

0 Kudos
Reply

1,295 Views
rsdio
Contributor II

If you're getting oscillations, then your PID code is not tuned correctly. Rough estimate is that you should be running at 100 ms (other folks may have a better suggestion), but your PID parameters should be adjusted to fix the oscillations, rather than slowing down the sample rate.

By the way, if you don't want your RPM changing very quickly, then your PID parameters can still enforce that. Just because the numbers are updated frequently doesn't mean their value must be allowed to change by a large amount.

0 Kudos
Reply

1,295 Views
kef2
Senior Contributor V

For less problems with PID, actuator (your throttle valve) should move as fast as possible. It should be much faster than your engine can drop or rise rpm's. PID update rate should be as high as possible. Higher here means only better.

Engine runs around some rpm and you want your rpm's to not drop too much when load changes. So with PID turned off, you need to measure rpm fall rate when typical load is applied. PID update rate should be at least 10x faster than that.

I don't mind what rates you can check. Good PID is fast PID. Problem choosing faster rate means either bad PID code or bad PID constants.

0 Kudos
Reply