Turn on suggestions

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

Auto-suggest helps you quickly narrow down your search results by suggesting possible matches as you type.

Showing results for

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

- Community
- Creo+ and Creo Parametric
- Analysis
- Feedback and torque control

Options

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page

Dec 11, 2018
10:58 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 11, 2018
10:58 AM

Feedback and torque control

Hello everybody,

I would try to implement a PID control over a simple crank connecting rod.

The system starts from standstill and has to reach a normal velocity of 3 rev/sec. The motor has a normal torque of 8,5 Nm and there is a force of 50 N along the "piston" axis.

I set the analysis as described in the attached PDF; the only difference is that in the example the motor has to fix the bar, so the final position is a fixed value and its velocity is zero. In my case the maotor continues to rotate; the desired velocity is the nominal one of 1080 deg/s and the desired position is (nominal_velocity * T).

I have two problems:

- I don't know the right value for the PID's constants.

I tried to run an optimization analysis to minimize the velocity error (intended like the absolute value of error) but I can't insert it like the goal. - I would limit the torque (in my mind the motor is a brushless) inside its operational field delimited by a max value for torque and velocity.

Any suggestions are welcome!

PS: I used Creo 5 for making the example.

Thanks

Bye

Solved! Go to Solution.

ACCEPTED SOLUTION

Accepted Solutions

Dec 14, 2018
03:10 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 14, 2018
03:10 PM

Attached is a working speed control.

I added a quadratic drag damping to be more realistic, otherwise the energy to maintain speed is exactly zero.

Note the parameter MAX_TORQUE cannot control the "Specify Domain" of the motor so the domain must be updated manually (you can enter MAX_TORQUE and it will __copy__ the value,but not link it)

If your intention was to control the second order effects, the motor is way under-specified and the analysis name CONSTANT will generate the torques required to keep the speed absolutely constant. (Larger than 100Nm)

Therefore the RMS speed was what is being controlled by the PID in my example.

I suggest a flywheel to limit the second order variation, but then it will take much longer to ramp up to speed as it is already maxing out the motor. That is what saturated means, something is maxed out, like the motor or the amplifiers.

I had lots of trouble using gain on the D part, crashing CREO, etc. maybe someone else can give insight on that, but based on the error I think it was just maxing out the size of matrix allowed in the solver. Or maybe I was not doing this quite right.

7 REPLIES 7

Dec 13, 2018
04:31 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 13, 2018
04:31 PM

Hello,

For position control PID would mean P = position, I = integral(position), D = speed.

For speed control PID would mean P = speed, I = position, D = acceleration.

It should be straight forward to change the variables/measures to match speed control based on the position control example.

also see this for some ideas on how one might go about tuning the gains.

I think you could use a function to limit the torque by the motor capability before tuning the PID.

psuedocode torqueToMotor= minimum(PID torque, max motor torque)

Or while tuning the PID gains you could watch the max torque and stop increasing gains when this is approached or at some % of the max that you want to target.

Dec 14, 2018
03:10 PM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 14, 2018
03:10 PM

Attached is a working speed control.

I added a quadratic drag damping to be more realistic, otherwise the energy to maintain speed is exactly zero.

Note the parameter MAX_TORQUE cannot control the "Specify Domain" of the motor so the domain must be updated manually (you can enter MAX_TORQUE and it will __copy__ the value,but not link it)

If your intention was to control the second order effects, the motor is way under-specified and the analysis name CONSTANT will generate the torques required to keep the speed absolutely constant. (Larger than 100Nm)

Therefore the RMS speed was what is being controlled by the PID in my example.

I suggest a flywheel to limit the second order variation, but then it will take much longer to ramp up to speed as it is already maxing out the motor. That is what saturated means, something is maxed out, like the motor or the amplifiers.

I had lots of trouble using gain on the D part, crashing CREO, etc. maybe someone else can give insight on that, but based on the error I think it was just maxing out the size of matrix allowed in the solver. Or maybe I was not doing this quite right.

Dec 17, 2018
04:00 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 17, 2018
04:00 AM

I'm studying your great work (!) for which I thank you.

I also don't understand why simulation fails with whatever Kd value...reducing timestep or Kd very very small don't work.

In addiction I don't understand why you said *"I added a quadratic drag damping to be more realistic, otherwise the energy to maintain speed is exactly zero"* when we have the 50N force which pushes on the slider.

Now I want to do some tries...I don't know if it's better controlling the system in **Velocity** or **Position**.

Dec 17, 2018
08:48 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 17, 2018
08:48 AM

The 50N force opposes motion only half the time, the other half it is assisting motion. The total work done per cycle is zero. If like friction, you want the 50N always opposing motion then do 50N*sign(velocity) or 50N*velocity_slider/abs(velocity_slider) so it changes direction when the slider changes direction.

If the goal is constant motor speed during one cycle by opposing the accelerations caused by oscillations of the slider, then using RMS will not work and also the motor is about 10X too weak to smooth the speed to constant.

Due to this you will not really notice its affect on the single cycle variations in speed. It only has enough torque to affect the average - RMS speed, so that is why I assumed RMS speed was what you were trying to control with PID.

Can you share the goal or purpose of the mechanism?

Dec 17, 2018
09:08 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 17, 2018
09:08 AM

I'm trying to do some example to learn something more about system controls with Creo. This is an aspect of designing that I've never explored.

Maybe a connecting rod-crank mechanism, without flywhell, isn't the best one to making experience...because it's difficult controlling it in velociti (non RMS one).

Normally in the our applications we want **constant velocity** or a specific motion law by means of brushless motors. Few hours ago my electric colleague told me that our drivers use three PID+an optional feedforward controls: PID over current/torque, position and velocity.

Dec 19, 2018
11:47 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Dec 19, 2018
11:47 AM

I've made new assembly where tried to insert controls on position, velocity and torque.

- For position the PID works.
- For velocity I can't use the derivative contribute (in the PID_v's formula there is *0 for TD).
- For torque I've obtained the nominal/theoretical curve from an analysis where I've imposed to the servo motor to exactly follows a motion law, so you could export points . I've inserted a dummy component to have a "free pin" where inserting a torque motor that import the theoretical curve. I was able to use only integral term...if I use proportional one it fails...

The tuning of gains was made through some manual tries, first imposing KI,KD=0.

I've made some tries on the reason why analyses fail when you use the derivative contribute.

The strange thing is that if you run the analysis in position it works...

I have also problems whit the proportional problem for torque. I don't know why.

I am open to suggestions.

Next steps will be:

- understanding if it's possible (and how) utilizing MBX to find the gains;

- trying to insert feedforward control.

- Tags:
- feedforward

Jan 09, 2019
02:17 AM

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator

Jan 09, 2019
02:17 AM

Does someone have any suggestions? Some document to share?