Zv IP

ZV_IP #

Brief #

This is an experimental component, it’s not fully tested.

The zv_ip component is responsible for applying a Zero Vibration (ZV) input shaper to the position and velocity commands of a motor. It reads the position and velocity commands, calculates the shaped commands, and outputs them for further processing.

Component Explanation #

The zv_ip component applies a Zero Vibration (ZV) input shaper to the position and velocity commands of a motor. This component operates within a hardware abstraction layer (HAL) framework, providing real-time control and non-real-time initialization functions.

  1. Input Reading and Initialization:
  • The component reads the position command (cmd_pos) and velocity command (cmd_vel) from input pins.
  • It also reads various parameters for the ZV input shaper, including natural_frequency, damping_ratio, A1, A2, and T.
  1. Parameter Calculation:
  • The component calculates the ZV input shaper parameters (A1, A2, and T) based on the natural_frequency and damping_ratio.
  1. Input Shaping:
  • The component applies the ZV input shaper to the position and velocity commands to generate the shaped position (shaped_pos) and shaped velocity (shaped_vel) outputs.
  1. Output Updates:
  • The component updates the output pins with the calculated shaped position and velocity commands.

Pins #

NameDescription
cmd_posinput, Position command
cmd_velinput, Velocity command
natural_frequencyparameter, Natural frequency of the system (Hz)
damping_ratioparameter, Damping ratio of the system
A1parameter, Amplitude of the first impulse
A2parameter, Amplitude of the second impulse
Tparameter, Time delay between impulses
prev_cmd_posinternal, Previous position command
prev_cmd_velinternal, Previous velocity command
timerinternal, Timer to track time delay
shaped_posoutput, Shaped position command
shaped_veloutput, Shaped velocity command

References #

Source: .c File