Need to slow down a current loop

Status
Not open for further replies.

mouse86

Newbie level 3
Joined
Sep 16, 2007
Messages
4
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,317
I have a small steering poke that outputs 4/20mA and a small engine that uses 4/20mA to determine what position it should be.

Now the signal transition from the poke is going too fast. E.g. when a full turn is done by a user (say from 4->20mA) the engine goes way to fast to his endpoint@20mA and damages mechanics since the power of the engine.

So I created some hardware that inputs 4/20mA (ADC) from the poke and outputs 4/20mA (DAC) to the engine.

Now, when there is a full turn done by the user with the Poke I want to reach the endpoint in about 6 seconds. In this time there should be a soft start and a slow-shutdown. This is mostly to prevent all the mechanics for a major blast.

So the signal should increase slowly (soft-start) like a x^2 and end slowly like a Square root.

I tried different thinks in MathLab, but it isn't going very well since I do not know what the best is what I can do. Can anyone supply me some kind of formula? Or give me some tips?

This is what I've now:

calculation = ((lastSample)*0.90+ (newSample) *0.1)
// above draws a nice slow-stop, it is actually some kind of low-pass

// with this below I was trying some things to built a soft-start, but it failed
if (calculation > lastSample + maxIncrease)
lastSample = lastSample + softstart;
softstart = softstart + 0.01;
end

but now I don't know how to continue.
 

To get a smooth position control, that's also continuous in first derivative, a higher order (2nd or 3rd) low-pass is the most simple solution, I think.
It can be achieved by a simple analog circuit. For an exact limitation of inertia moment, an upper bound for the 2nd signal derivative should be set.
 

Do you maybe have an example of such a filter in Mathlab or C?
 

Status
Not open for further replies.
Cookies are required to use this site. You must accept them to continue using the site. Learn more…