Prius IPM controller

Dependencies:   mbed

Fork of analoghalls5_5 by N K

Embed: (wiki syntax)

« Back to documentation index

Show/hide line numbers meta.h Source File

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