Commit d8a9e8f4 by RBO lab

cleanup of the mass controller interface

parent 1bea8410
......@@ -471,32 +471,33 @@ const eMessageType MSGTYPE_BROADCAST8 = 0x304; //reply message that
typedef struct {
HeaderConfigurationMsgs header_config;
AirServerSignal in_desired;
AirServerSignal in_desired_massflow; //desired mass flow
AirServerSignal in_desired_mass; //alternatively: desired mass
AirServerSignal out_inflate;
AirServerSignal out_deflate;
AirServerSignal pressure_supply;
AirServerSignal pressure_out;
AirServerSignal mass_desired;
AirServerSignal mass_linear;
AirServerSignal mass_leeco;
AirServerSignal mass;
AirServerSignal out_massobserver;
AirServerSignal out_massobserver_term_friction;
AirServerSignal out_massobserver_term_injector;
AirServerSignalValue c_inf;
AirServerSignalValue c_inf_linear;
AirServerSignalValue c_inf_leeco;
AirServerSignalValue c_inf_Psupp;
AirServerSignalValue c_inf_Pact;
AirServerSignalValue c_def;
AirServerSignalValue c_def_linear;
AirServerSignalValue c_def_leeco;
AirServerSignalValue c_def_Psupp;
AirServerSignalValue c_def_Pact;
AirServerSignalValue inf_threshold;
AirServerSignalValue def_threshold;
AirServerSignalValue c_inflate;
AirServerSignalValue c_inflate_friction;
AirServerSignalValue c_inflate_injector;
AirServerSignalValue c_inflate_Psupply;
AirServerSignalValue c_inflate_Pout;
AirServerSignalValue c_deflate;
AirServerSignalValue c_deflate_friction;
AirServerSignalValue c_deflate_injector;
AirServerSignalValue c_deflate_Psupply;
AirServerSignalValue c_deflate_Pout;
AirServerSignalValue c_inflation_threshold;
AirServerSignalValue c_deflation_threshold;
} MsgConfigurationControllerMassflow;
......
......@@ -114,47 +114,20 @@ namespace AirserverController{
*/
class CntrlMassflow : public Cntrl{
private:
AirServerSignal in_desired;
AirServerSignal out_inflate;
AirServerSignal out_deflate;
AirServerSignal pressure_supply;
AirServerSignal pressure_out;
// the desired air mass in the actuator,
// equals zero at controller start
AirServerSignal mass_desired;
// the estimated air mass in the actuator as per multiple models
// equals zero at controller start
//If you want to monitor the estimates, set these signals to something other than SIGNAL_NONE
AirServerSignal mass_linear;
AirServerSignal mass_leeco;
AirServerSignal mass_psi;
AirServerSignal mass; // models and parameters combined
// The next block specificies a list of coefficients to configure the mass observer model
// These parameters need to be calibrated for a given hardware.
// inflation:
AirServerSignalValue c_inf; // constant for each inflation, leap when valve opens
AirServerSignalValue c_inf_linear; // scaling factor for linear air mass flow model
AirServerSignalValue c_inf_leeco; // scaling factor for air mass flow model as per Lee Company
AirServerSignalValue c_inf_Psupp; // scaling factor for supply pressure at inflation start, results in a constant for each inflation, valve opening time might be influenced by supply pressure
AirServerSignalValue c_inf_Pact; // scaling factor for actuator pressure at inflation start,
// results in a constant for each inflation
// deflation:
AirServerSignalValue c_def; // ^
AirServerSignalValue c_def_linear;
AirServerSignalValue c_def_leeco;
AirServerSignalValue c_def_Psupp;
AirServerSignalValue c_def_Pact;
//The next two parameters specify the hysteresis around the desired mass, inflation and deflation are only started when exiting the band.
//Set this as low as possible given the minimal change of air mass possible by the hardware
AirServerSignalValue inf_threshold;
AirServerSignalValue def_threshold;
// nominal environment pressure:
MsgConfigurationControllerMassflow config; //copy of the configuration
AirServerSignalValue out_inflation_valvestate; //local copy of the last set valve state for graceful degradation when not controlling valves
AirServerSignalValue out_deflation_valvestate; //local copy of the last set valve state for graceful degradation when not controlling valves
AirServerSignalValue desired_mass; //current desired mass, either computed from desired massflow or set from a signal
//internal states of the mass observer:
AirServerSignalValue observer_mass_estimate; //aggregate estimate
AirServerSignalValue observer_term_injector; //injector model
AirServerSignalValue observer_term_friction; //friction model
// nominal ambient pressure used as pressure reference and outlet pressure when deflating:
float P_ENV= 101.3; //kPa
// error between mass desired
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment