Commit 82ae4f2f by RBO lab

massflow controller for n fingers

parent bf6de540
......@@ -170,16 +170,74 @@ inline bool IsClientCompatible(uint32_t clientApiVersion)
const AirServerSignal BLOCK_SIGNALS_TOUCHSENSOR_FINGER4_MAX = BLOCK_SIGNALS_SENSOR+0x2F;
//massflow signals
const AirServerSignal SIGNAL_MASS_DESIRED = BLOCK_SIGNALS_SENSOR+0x40;
const AirServerSignal SIGNAL_MASS_DELTA_PRESSURE= BLOCK_SIGNALS_SENSOR+0x40 +1;
const AirServerSignal SIGNAL_MASS_LINEAR = BLOCK_SIGNALS_SENSOR+0x40 +2;
const AirServerSignal SIGNAL_MASS_LEECO = BLOCK_SIGNALS_SENSOR+0x40 +3;
const AirServerSignal SIGNAL_MASS_PSI = BLOCK_SIGNALS_SENSOR+0x40 +4;
const AirServerSignal SIGNAL_MASS = BLOCK_SIGNALS_SENSOR+0x40 +5;
const AirServerSignal SIGNAL_MASS_FLOW_LINEAR = BLOCK_SIGNALS_SENSOR+0x40 +6;
const AirServerSignal SIGNAL_MASS_FLOW_LEECO = BLOCK_SIGNALS_SENSOR+0x40 +7;
const AirServerSignal SIGNAL_MASS_FLOW_PSI = BLOCK_SIGNALS_SENSOR+0x40 +8;
const AirServerSignal SIGNAL_MASS_FLOW = BLOCK_SIGNALS_SENSOR+0x40 +9;
const AirServerSignal BLOCK_SIGNALS_MASS_FLOW= BLOCK_SIGNALS_SENSOR +0x40;
const AirServerSignal SIGNAL_MASS_DESIRED_0 = BLOCK_SIGNALS_MASS_FLOW;
const AirServerSignal SIGNAL_MASS_DELTA_PRESSURE_0= BLOCK_SIGNALS_MASS_FLOW +1;
const AirServerSignal SIGNAL_MASS_LINEAR_0 = BLOCK_SIGNALS_MASS_FLOW +2;
const AirServerSignal SIGNAL_MASS_LEECO_0 = BLOCK_SIGNALS_MASS_FLOW +3;
const AirServerSignal SIGNAL_MASS_PSI_0 = BLOCK_SIGNALS_MASS_FLOW +4;
const AirServerSignal SIGNAL_MASS_0 = BLOCK_SIGNALS_MASS_FLOW +5;
const AirServerSignal SIGNAL_MASS_FLOW_LINEAR_0 = BLOCK_SIGNALS_MASS_FLOW +6;
const AirServerSignal SIGNAL_MASS_FLOW_LEECO_0 = BLOCK_SIGNALS_MASS_FLOW +7;
const AirServerSignal SIGNAL_MASS_FLOW_PSI_0 = BLOCK_SIGNALS_MASS_FLOW +8;
const AirServerSignal SIGNAL_MASS_FLOW_0 = BLOCK_SIGNALS_MASS_FLOW +9;
const AirServerSignal SIGNAL_MASS_DESIRED_1 = BLOCK_SIGNALS_MASS_FLOW +10;
const AirServerSignal SIGNAL_MASS_DELTA_PRESSURE_1= BLOCK_SIGNALS_MASS_FLOW +11;
const AirServerSignal SIGNAL_MASS_LINEAR_1 = BLOCK_SIGNALS_MASS_FLOW +12;
const AirServerSignal SIGNAL_MASS_LEECO_1 = BLOCK_SIGNALS_MASS_FLOW +13;
const AirServerSignal SIGNAL_MASS_PSI_1 = BLOCK_SIGNALS_MASS_FLOW +14;
const AirServerSignal SIGNAL_MASS_1 = BLOCK_SIGNALS_MASS_FLOW +15;
const AirServerSignal SIGNAL_MASS_FLOW_LINEAR_1 = BLOCK_SIGNALS_MASS_FLOW +16;
const AirServerSignal SIGNAL_MASS_FLOW_LEECO_1 = BLOCK_SIGNALS_MASS_FLOW +17;
const AirServerSignal SIGNAL_MASS_FLOW_PSI_1 = BLOCK_SIGNALS_MASS_FLOW +18;
const AirServerSignal SIGNAL_MASS_FLOW_1 = BLOCK_SIGNALS_MASS_FLOW +19;
const AirServerSignal SIGNAL_MASS_DESIRED_2 = BLOCK_SIGNALS_MASS_FLOW +20;
const AirServerSignal SIGNAL_MASS_DELTA_PRESSURE_2= BLOCK_SIGNALS_MASS_FLOW +21;
const AirServerSignal SIGNAL_MASS_LINEAR_2 = BLOCK_SIGNALS_MASS_FLOW +22;
const AirServerSignal SIGNAL_MASS_LEECO_2 = BLOCK_SIGNALS_MASS_FLOW +23;
const AirServerSignal SIGNAL_MASS_PSI_2 = BLOCK_SIGNALS_MASS_FLOW +24;
const AirServerSignal SIGNAL_MASS_2 = BLOCK_SIGNALS_MASS_FLOW +25;
const AirServerSignal SIGNAL_MASS_FLOW_LINEAR_2 = BLOCK_SIGNALS_MASS_FLOW +26;
const AirServerSignal SIGNAL_MASS_FLOW_LEECO_2 = BLOCK_SIGNALS_MASS_FLOW +27;
const AirServerSignal SIGNAL_MASS_FLOW_PSI_2 = BLOCK_SIGNALS_MASS_FLOW +28;
const AirServerSignal SIGNAL_MASS_FLOW_2 = BLOCK_SIGNALS_MASS_FLOW +29;
const AirServerSignal SIGNAL_MASS_DESIRED_3 = BLOCK_SIGNALS_MASS_FLOW +30;
const AirServerSignal SIGNAL_MASS_DELTA_PRESSURE_3= BLOCK_SIGNALS_MASS_FLOW +31;
const AirServerSignal SIGNAL_MASS_LINEAR_3 = BLOCK_SIGNALS_MASS_FLOW +32;
const AirServerSignal SIGNAL_MASS_LEECO_3 = BLOCK_SIGNALS_MASS_FLOW +33;
const AirServerSignal SIGNAL_MASS_PSI_3 = BLOCK_SIGNALS_MASS_FLOW +34;
const AirServerSignal SIGNAL_MASS_3 = BLOCK_SIGNALS_MASS_FLOW +35;
const AirServerSignal SIGNAL_MASS_FLOW_LINEAR_3 = BLOCK_SIGNALS_MASS_FLOW +36;
const AirServerSignal SIGNAL_MASS_FLOW_LEECO_3 = BLOCK_SIGNALS_MASS_FLOW +37;
const AirServerSignal SIGNAL_MASS_FLOW_PSI_3 = BLOCK_SIGNALS_MASS_FLOW +38;
const AirServerSignal SIGNAL_MASS_FLOW_3 = BLOCK_SIGNALS_MASS_FLOW +39;
const AirServerSignal SIGNAL_MASS_DESIRED_4 = BLOCK_SIGNALS_MASS_FLOW +40;
const AirServerSignal SIGNAL_MASS_DELTA_PRESSURE_4= BLOCK_SIGNALS_MASS_FLOW +41;
const AirServerSignal SIGNAL_MASS_LINEAR_4 = BLOCK_SIGNALS_MASS_FLOW +42;
const AirServerSignal SIGNAL_MASS_LEECO_4 = BLOCK_SIGNALS_MASS_FLOW +43;
const AirServerSignal SIGNAL_MASS_PSI_4 = BLOCK_SIGNALS_MASS_FLOW +44;
const AirServerSignal SIGNAL_MASS_4 = BLOCK_SIGNALS_MASS_FLOW +45;
const AirServerSignal SIGNAL_MASS_FLOW_LINEAR_4 = BLOCK_SIGNALS_MASS_FLOW +46;
const AirServerSignal SIGNAL_MASS_FLOW_LEECO_4 = BLOCK_SIGNALS_MASS_FLOW +47;
const AirServerSignal SIGNAL_MASS_FLOW_PSI_4 = BLOCK_SIGNALS_MASS_FLOW +48;
const AirServerSignal SIGNAL_MASS_FLOW_4 = BLOCK_SIGNALS_MASS_FLOW +49;
const AirServerSignal SIGNAL_MASS_DESIRED_5 = BLOCK_SIGNALS_MASS_FLOW +50;
const AirServerSignal SIGNAL_MASS_DELTA_PRESSURE_5= BLOCK_SIGNALS_MASS_FLOW +51;
const AirServerSignal SIGNAL_MASS_LINEAR_5 = BLOCK_SIGNALS_MASS_FLOW +52;
const AirServerSignal SIGNAL_MASS_LEECO_5 = BLOCK_SIGNALS_MASS_FLOW +53;
const AirServerSignal SIGNAL_MASS_PSI_5 = BLOCK_SIGNALS_MASS_FLOW +54;
const AirServerSignal SIGNAL_MASS_5 = BLOCK_SIGNALS_MASS_FLOW +55;
const AirServerSignal SIGNAL_MASS_FLOW_LINEAR_5 = BLOCK_SIGNALS_MASS_FLOW +56;
const AirServerSignal SIGNAL_MASS_FLOW_LEECO_5 = BLOCK_SIGNALS_MASS_FLOW +57;
const AirServerSignal SIGNAL_MASS_FLOW_PSI_5 = BLOCK_SIGNALS_MASS_FLOW +58;
const AirServerSignal SIGNAL_MASS_FLOW_5 = BLOCK_SIGNALS_MASS_FLOW +59;
/*valve activation signals
value > 0.5: valve is switched on
......@@ -414,7 +472,7 @@ const eMessageType MSGTYPE_BROADCAST8 = 0x304; //reply message that
} MsgConfigurationControllerBangBang;
/* TODO
/*
Configures a Massflow Controller
*/
......@@ -427,6 +485,20 @@ const eMessageType MSGTYPE_BROADCAST8 = 0x304; //reply message that
AirServerSignal pressure_supply;
AirServerSignal pressure_out;
AirServerSignal mass_desired;
AirServerSignal delta_pressure;
AirServerSignal mass_linear;
AirServerSignal mass_leeco;
AirServerSignal mass_psi;
AirServerSignal mass;
AirServerSignal mass_flow_linear;
AirServerSignal mass_flow_leeco;
AirServerSignal mass_flow_psi;
AirServerSignal mass_flow;
AirServerSignalValue c_inf;
AirServerSignalValue c_inf_linear;
AirServerSignalValue c_inf_leeco;
......@@ -594,7 +666,7 @@ typedef struct {
#define MAX_LENGTH (sizeof(MsgControllerConfiguration))
const unsigned int MAX_MESSAGE_LENGTH = ((4+20)*sizeof(uint32_t)); //maximum: message with 10 fields
const unsigned int MAX_MESSAGE_LENGTH = ((4+30)*sizeof(uint32_t)); //maximum: message with 30 fields
......
......@@ -119,7 +119,29 @@ namespace AirserverController{
AirServerSignal out_deflate;
AirServerSignal pressure_supply;
AirServerSignal pressure_out;
// for offline analyses even though
// high sampled data already offers that
// with pressure supply and pressure out
AirServerSignal delta_pressure;
// 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
AirServerSignal mass_linear;
AirServerSignal mass_leeco;
AirServerSignal mass_psi;
AirServerSignal mass; // models and parameters combined
// current mass flow as per multiple models
AirServerSignal mass_flow_linear;
AirServerSignal mass_flow_leeco;
AirServerSignal mass_flow_psi;
AirServerSignal mass_flow; // models combined
// linear regression coefficients
// inflation:
AirServerSignalValue c_inf; // constant for each inflation, leap when valve opens
......@@ -148,17 +170,6 @@ namespace AirserverController{
// and current in-/deflated mass
float error;
// the desired air mass in the actuator,
// equals zero at controller start
float mass_desired;
// the estimated air mass in the actuator as per multiple models
// equals zero at controller start
float mass_linear;
float mass_leeco;
float mass_psi;
float mass; // combines models and parameters
/** calculates massflow using a linear model
* @param Pi: inlet pressure as measured, relative to environment, not absolute
* for inflation pressure_supply, for deflation pressure_out
......
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