Semi-active Damper

Example

SemiActiveDamper/

Problem Description

A vehicle contacts the wall through the spring and damper:

  • The state vector of the system is x=[y,\dot{y}]^T, where y is the position of the vehicle.

  • The input is the damping coefficient d, which is constrained with 0\leq d \leq 1.

  • The dynamic equation of this semi-active damper is m\ddot{y} = -ky-d\dot{y}, where k = 1 and m=1.

The task is to control the vehicle's position y to 0 from an initial position.

Closed-loop Simulation using ParNMPC

Step 1. NMPC problem formulation

See Workflow of ParNMPC > NMPC Problem Formulation.

Example

SemiActiveDamper/NMPC_Problem_Formulation.m

See Workflow of ParNMPC > Code Generation and Deployment > Simulink.

  1. Code generation

    Example

    SemiActiveDamper/Simu_Simulink_Setup.m

  2. Deployment

    Example

    SemiActiveDamper/Simu_Simulink.slx