Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependencies: mbed-dev-f303 FastPWM3
Diff: CurrentRegulator/CurrentRegulator.h
- Revision:
- 9:d7eb815cb057
- Parent:
- 8:10ae7bc88d6e
- Child:
- 10:370851e6e132
diff -r 10ae7bc88d6e -r d7eb815cb057 CurrentRegulator/CurrentRegulator.h
--- a/CurrentRegulator/CurrentRegulator.h Wed Apr 13 04:09:56 2016 +0000
+++ b/CurrentRegulator/CurrentRegulator.h Tue May 10 01:15:57 2016 +0000
@@ -1,5 +1,6 @@
-#ifndef CURRENTRETULATOR_H
+#ifndef CURRENTREGULATOR_H
#define CURRENTREGULATOR_H
+
#include "Inverter.h"
#include "SVM.h"
#include "PositionSensor.h"
@@ -9,9 +10,10 @@
CurrentRegulator(Inverter *inverter, PositionSensor *position_sensor, float Kp, float Ki);
void UpdateRef(float D, float Q);
void Commutate();
+ void Reset();
private:
float IQ_Ref, ID_Ref, V_Q, V_D, V_Alpha, V_Beta, V_A, V_B, V_C, I_Q, I_D, I_A, I_B, I_C, I_Alpha, I_Beta, theta_elec, _Kp, _Ki;
- float Q_Integral, D_Integral, Q_Error, D_Error, Int_Max, DTC_Max;
+ float Q_Integral, D_Integral, Q_Error, D_Error, Int_Max, DTC_Max, Q_Max;
void SampleCurrent();
void SetVoltage();
void Update();