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.
Fork of priustroller_2 by
meta.h
00001 #ifndef __META_H 00002 #define __META_H 00003 00004 #include "includes.h" 00005 #include "core.h" 00006 #include "sensors.h" 00007 #include "filters.h" 00008 00009 class Modulator { 00010 public: 00011 Modulator(Inverter *inverter) {_inverter = inverter;} 00012 virtual void Update(float valpha, float vbeta) = 0; 00013 protected: 00014 Inverter* _inverter; 00015 }; 00016 00017 class SinusoidalModulator: public Modulator { 00018 public: 00019 SinusoidalModulator(Inverter *inverter):Modulator(inverter) {} 00020 virtual void Update(float valpha, float vbeta); 00021 }; 00022 00023 class SvmModulator: public Modulator { 00024 public: 00025 SvmModulator(Inverter *inverter):Modulator(inverter) {} 00026 virtual void Update(float valpha, float vbeta); 00027 }; 00028 00029 class ReferenceSynthesizer { 00030 public: 00031 ReferenceSynthesizer(float max_phase_current) {_max_phase_current = max_phase_current;} 00032 virtual void GetReference(float angle, float throttle, float *ref_d, float *ref_q) {*ref_d = 0; *ref_q = 0;} 00033 protected: 00034 static float LutSin(float theta); 00035 static float LutCos(float theta); 00036 protected: 00037 float _max_phase_current; 00038 }; 00039 00040 class SynchronousReferenceSynthesizer : public ReferenceSynthesizer { 00041 public: 00042 SynchronousReferenceSynthesizer(float max_phase_current):ReferenceSynthesizer(max_phase_current) {} 00043 virtual void GetReference(float angle, float throttle, float *ref_d, float *ref_q); 00044 }; 00045 00046 #endif 00047
Generated on Tue Jul 12 2022 18:31:15 by
1.7.2
