PWM command interferance #145
-
Hi there, I am trying to perform a step response on a HEBI robotic x8-9 actuator for some system identification data. To do this I put the motor in PWM mode and gave it a cmd command of 1 (in documentation effort cmd's are direct PWM cmd's in strategy 1). I have decoupled my system from the load so it can run freely for now. I was expecting to see a maximum acceleration toward the maximum velocity, but a noticed that the PWM signal gets flattened off long before that speed is reached (or the PWM hits a value of 1), checking the alarms however does not reveal any triggers. Below is an image of the step response, notice how the PWM signal gets manipulated (delayed) from a value of around 0.6, then rises to 0.8, and stabilizes towards a 0.5 probably because the velocity limit has now been reached (not shown in the alarm states however). I also included a zoom of the pwmCmd signal and the corresponding responses here: Here is an image of the alarm states. I am wondering why this PWM modulation happens and what is a proper way to collect system identification data on these actuators? Kind regards, Roy For completeness I also uploaded the full MATLAB code that executes the PWM code and plots the figures here (from some reason i notice that some parts are plotted as clean text and i don't have an immediate idea why that is, apologies for this):
HebiLookup.setLookupAddresses(addresses); disp(HebiLookup); try if (hebiConnected == true) group.setFeedbackFrequency(sampleFreq); % Create cmd struct for HEBI modules % Request full feedback: foc = FocCommandStruct(); % Move nicely to zero gains.positionKp = 50; gains.velocityKp = 0.03; gains.controlStrategy = 4; % sendSafetyParams; group.send('gains', gains); % Move to neutralAngle: neutralAngle = 0; % Rad/sec % Setup % Get current position % Create trajectory time = [0 3]; trajectory = trajGen.newJointMove(positions, 'time', time); % execute trajectory
% gains.controlStrategy = ControlStrategyDirectPWM;
end %% Load an example Hebi log file and save % load raw log file hebiData = load(matfile); figurename = "Hebi motor response"; plot(hebiData.time, hebiData.motorCurrent, 'r:'); plot(hebiData.time, hebiData.motorPosition, 'g:'); legend('pwm Cmd', 'inner effort cmd ', 'motorCurrent', 'windingCurrent', 'Voltage', 'motorPosition', 'motorVelocity'); figurename = "Hebi output response"; plot(hebiData.time, hebiData.position, 'r'); %plot(hebiData.time, hebiData.deflection, 'b:'); hold off; legend('pwm Cmd', 'inner effort cmd ', 'pos Response', 'vel Response', 'torque Response', 'deflection', 'deflection Velocity'); figurename = "Hebi alarms"; ylim([-1.5 1.5])
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Roy, What you're seeing are some of the safety controllers activating that limit the actuators. There's a motor velocity safety limit that is a PI controller that keeps the motor under a certain RPM to prevent damage to the geartrain. There's also a motor voltage limit that caps the max voltage that can be applied to the motor. This limit is based on the motor's velocity. So based on the plots above, it looks like:
Of the low-level safety controllers (the 'fixed' controllers in red at the link above), only the temperature limit will show an alarm state or change the status LEDs. We'll get some more information on this added to the documentation. Since at your voltage the motor reaches its max velocity at about 0.5 PWM you can command that as your step and you should get a response that is a little slower, but doesn't have any of the safety controllers engaging. Hope this helps, |
Beta Was this translation helpful? Give feedback.
Roy,
What you're seeing are some of the safety controllers activating that limit the actuators.
http://docs.hebi.us/core_concepts.html#safety_controller
There's a motor velocity safety limit that is a PI controller that keeps the motor under a certain RPM to prevent damage to the geartrain. There's also a motor voltage limit that caps the max voltage that can be applied to the motor. This limit is based on the motor's velocity. So based on the plots above, it looks like:
Of the low-level safety co…