File tree Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Expand file tree Collapse file tree 3 files changed +16
-6
lines changed Original file line number Diff line number Diff line change @@ -78,7 +78,7 @@ class BLDCMotor: public FOCMotor
78
78
* @param Ud Current voltage in d axis to set to the motor
79
79
* @param angle_el current electrical angle of the motor
80
80
*/
81
- void setPhaseVoltage (float Uq, float Ud, float angle_el);
81
+ void setPhaseVoltage (float Uq, float Ud, float angle_el) override ;
82
82
83
83
private:
84
84
// FOC methods
Original file line number Diff line number Diff line change @@ -78,19 +78,18 @@ class StepperMotor: public FOCMotor
78
78
79
79
float Ualpha,Ubeta; // !< Phase voltages U alpha and U beta used for inverse Park and Clarke transform
80
80
81
- private:
82
-
83
- // FOC methods
84
- /* *
81
+ /* *
85
82
* Method using FOC to set Uq to the motor at the optimal angle
86
83
* Heart of the FOC algorithm
87
84
*
88
85
* @param Uq Current voltage in q axis to set to the motor
89
86
* @param Ud Current voltage in d axis to set to the motor
90
87
* @param angle_el current electrical angle of the motor
91
88
*/
92
- void setPhaseVoltage (float Uq, float Ud , float angle_el);
89
+ void setPhaseVoltage (float Uq, float Ud, float angle_el) override ;
93
90
91
+ private:
92
+
94
93
/* * Sensor alignment to electrical 0 angle of the motor */
95
94
int alignSensor ();
96
95
/* * Motor and sensor alignment to the sensors absolute 0 angle */
Original file line number Diff line number Diff line change @@ -127,6 +127,16 @@ class FOCMotor
127
127
*/
128
128
virtual void move (float target = NOT_SET)=0;
129
129
130
+ /* *
131
+ * Method using FOC to set Uq to the motor at the optimal angle
132
+ * Heart of the FOC algorithm
133
+ *
134
+ * @param Uq Current voltage in q axis to set to the motor
135
+ * @param Ud Current voltage in d axis to set to the motor
136
+ * @param angle_el current electrical angle of the motor
137
+ */
138
+ virtual void setPhaseVoltage (float Uq, float Ud, float angle_el)=0;
139
+
130
140
// State calculation methods
131
141
/* * Shaft angle calculation in radians [rad] */
132
142
float shaftAngle ();
@@ -137,6 +147,7 @@ class FOCMotor
137
147
float shaftVelocity ();
138
148
139
149
150
+
140
151
/* *
141
152
* Electrical angle calculation
142
153
*/
You can’t perform that action at this time.
0 commit comments