From 67ef08749924e759a04834d27cee40ec6e0a1854 Mon Sep 17 00:00:00 2001 From: Nicolas Schodet Date: Sun, 16 Mar 2008 18:36:49 +0100 Subject: * digital/asserv/src/asserv: - added AMAX32GHP model. - fixed missing voltage multiplication. - added support for separated encoders. - model reorganisation. - fixed counters drift. --- digital/asserv/src/asserv/motor_model.host.h | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) (limited to 'digital/asserv/src/asserv/motor_model.host.h') diff --git a/digital/asserv/src/asserv/motor_model.host.h b/digital/asserv/src/asserv/motor_model.host.h index 9b0ce712..3a04e15a 100644 --- a/digital/asserv/src/asserv/motor_model.host.h +++ b/digital/asserv/src/asserv/motor_model.host.h @@ -25,27 +25,34 @@ * * }}} */ -/** Motor and load caracteristics and current data. */ -struct motor_t +/** Motor and load characteristics. */ +struct motor_def_t { - /* Motor caracteristics. */ + /* Motor characteristics. */ double Ke; /* Speed constant ((rad/s)/V). */ double Kt; /* Torque constant (N.m/A). */ double Rf; /* Bearing friction (N.m/(rad/s)). */ double R; /* Terminal resistance (Ohm). */ double L; /* Terminal inductance (H). */ - /* Gearbox caracteristics. */ + double u_max;/* Maximum voltage (V). */ + /* Gearbox characteristics. */ double i_G; /* Gearbox ratio. */ double ro_G;/* Gearbox efficiency. */ - /* Load caracteristics. */ - double J; /* Load (kg.m^2). */ - /* Wheel caracteristics. */ - double w_r; /* Wheel radius (m). */ + /* Load characteristics. */ + double J; /* Load at gearbox output (kg.m^2). */ +}; + +/** Motor and load characteristics and current data. Angular speed and theta + * are at motor output, not gearbox output. */ +struct motor_t +{ + /* Motor and load characteristics. */ + struct motor_def_t m; /* Simulation parameters. */ double h; /* Simulation time step (s). */ int d; /* Simulation time step division. */ /* Simulation current state. */ - double t; /* Current time (not realy used) (s). */ + double t; /* Current time (not really used) (s). */ double u; /* Current input voltage (V). */ double i; /* Current current (A). */ double o; /* Current angular speed (o for omega) (rad/s). */ -- cgit v1.2.3