root/applications/pmsm/pmsm_ctrl.h @ 1301

Revision 1298, 15.1 kB (checked in by smidl, 13 years ago)

zmena PMSM_CTRL - akceptuje 2d modely
Pokusy v lq_dq2.cfg

Line 
1#ifndef PMSM_CTR_H
2#define PMSM_CTR_H
3
4#include <estim/particles.h>
5#include <design/ctrlbase.h>
6#include <design/lq_ctrl.h>
7#include "pmsm.h"
8
9#include <fstream>
10
11/*! \defgroup PMSM
12@{
13*/
14
15using namespace bdm;
16
17
18/*! PI Controller*/
19class PI_ctrl: public Controller{
20public:
21        //!integral state
22        double S;
23        double Pd;
24        double Pi;
25        double minOut;
26        double maxOut;
27       
28        PI_ctrl(double Pd0, double Pi0, double minOut0, double maxOut0): S(0.0), Pd(Pd0), Pi(Pi0),minOut(minOut0),maxOut(maxOut0){}
29        virtual vec ctrlaction ( const vec &cond ) {
30                        double tmp;
31                        tmp = Pd*cond(0)+S;
32                       
33                        S += Pi*cond(0);
34                       
35                        if (tmp>maxOut) tmp=maxOut;
36                        if (tmp<minOut) tmp=minOut;
37                        return vec_1(tmp);
38        }
39};
40
41/*! \brief Root class for controllers of PMSM
42 *
43 * It defines the interface for controllers that connect to the pmsmDSctrl.
44 * The adapt() function calls bayes() of an internal BM. Note that it is assumed that the estimator is compatible with PMSM system.
45 * I.e. it must have rv={ia, ib} and rvc={ua,ub}, any other BM will not work.
46 *
47 * Two cases are considered:
48 *  - 4 dimensional rv={ia, ib, om, th} and rvc={ua,ub}
49 *  - 2 dimensional rv={om, th} and rvc={ua,ub,ia_{t-1}, ib_{t-1} }
50 *  These are hardcoded and sitched based on dimensionality.
51 */
52class PMSMCtrl: public Controller{
53protected:
54        //! Est where rv and rcv are not used!
55        shared_ptr<BM> Est;
56        //! switch to use or not to use the internal estimator
57        bool estim;
58       
59        // internal quantities filled by PMSMCtrl::ctrlaction()
60        double isa;
61        double isb;
62        double ome;
63        double the;
64        double Ww;
65       
66public:
67
68        PMSMCtrl():Controller() {
69                rv = RV("{ua ub }");
70                rvc = RV("{o_ia o_ib t_ua t_ub o_om o_th Ww }");
71        }
72       
73    void adapt(const itpp::vec& data){
74                if (estim){
75                        vec y=data.get(0,1);
76                        vec u=data.get(2,3);
77                        if (Est->dimension()==2){
78                                static vec cond(4); //
79                                cond.set_subvector(0,1,u);
80                                Est->bayes(y,cond);
81                                cond.set_subvector(2,3,y); // save 1-step delayed vectors
82                               
83                        } else {
84                                Est->bayes(y,u);
85                               
86                        }
87                       
88                }
89        }
90       
91       
92    virtual vec ctrlaction(const itpp::vec& cond) {
93               
94                if (estim){
95                        if (Est->dimension()==2){
96                                vec x_est=Est->posterior().mean();
97                                isa=cond(0);
98                                isb=cond(1);
99                                ome=x_est(0);
100                                the=x_est(1);
101                        } else {
102                        vec x_est=Est->posterior().mean();
103                        isa=x_est(0);
104                        isb=x_est(1);
105                        ome=x_est(2);
106                        the=x_est(3);
107                        }
108                } else {
109                        isa=cond(0);//x_est(0);
110                        isb=cond(1);//x_est(1);
111                        ome=cond(4);//x[2];//x_est(2);
112                        the=cond(5);//x_est(3);
113                }
114                Ww=cond(6);
115               
116                return empty_vec; // dummy return
117        };
118    void from_setting(const libconfig::Setting& set){
119                Controller::from_setting(set);
120                Est=UI::build<BM>(set,"estim",UI::optional);
121                estim = Est; 
122        }
123        void log_register ( logger &L, const string &prefix ) {
124                Controller::log_register(L,prefix);
125                if (estim) Est->log_register(L,prefix);
126        }
127        void log_write() const{
128                if (estim) Est->log_write();
129        }
130};
131//UIREGISTER(PMSMCtrl); -- abstract
132
133class PMSM_PICtrl: public PMSMCtrl{
134public:
135        PI_ctrl Cwq;
136        PI_ctrl Cuq;
137        PI_ctrl Cud;
138               
139        PMSM_PICtrl():PMSMCtrl(),
140        Cwq(3.0, 3.0*0.000125/0.1, -1200, 1200), 
141        Cuq(20.0, 20.0*0.000125/0.005, -1200, 1200),
142        Cud(20.0, 20.0*0.000125/0.005, -1200, 1200) {}
143               
144       
145        virtual vec ctrlaction(const itpp::vec& cond) {
146                PMSMCtrl::ctrlaction(cond); // fills isa,isb,om,the
147               
148                double Isd = isa*cos(the)+isb*sin(the);
149                double Isq = isb*cos(the)-isa*sin(the);
150               
151                double Iqw=(Cwq.ctrlaction(vec_1(Ww-ome)))(0); // conversion from vec
152               
153                double ud = (Cud.ctrlaction(vec_1(-Isd)))(0);
154                double uq = (Cuq.ctrlaction(vec_1(Iqw-Isq)))(0);
155               
156                const double Ls0=0.003465; // inductance
157                const double Fmag0= 0.1989; // Magnetic??
158               
159                ud-=Ls0*ome*Iqw; // har
160                uq+=Fmag0*ome;
161               
162                double Um = sqrt(ud*ud+uq*uq);
163                double beta = atan(uq/ud);
164                if (ud<0) beta += M_PI;
165                beta +=the;
166               
167                vec uab(2);
168                uab(0)=Um*cos(beta);               // usx = usa
169                uab(1)=Um*sin(beta);    // usy
170               
171                return uab;
172        };
173};
174UIREGISTER(PMSM_PICtrl);
175
176class PMSM_LQCtrl: public PMSMCtrl{
177public:
178/*
179PMSMCtrl:
180        double isa;
181        double isb;
182        double ome;
183        double the;
184        double Ww;
185*/     
186
187//PMSM parameters
188        const double a;
189        const double b;
190        const double c;
191        const double d;
192        const double e;
193       
194//input penalty
195        double r;
196       
197//time step
198        const double Dt;
199       
200//receding horizon
201        int rec_hor;
202       
203//system matrices
204        mat A; //5x5
205        mat B; //5x2
206        //mat C; //2x5
207        mat Q; //5x5
208        mat R; //2x2   
209       
210//control matrix
211        mat L;
212        vec uab;
213        vec icond;
214       
215//control maximum
216        const double MAXu;
217       
218//lqg controler class
219        LQG_universal lq;       
220       
221//prediction
222        vec p_isa, p_isb, p_ome, p_the;
223               
224        PMSM_LQCtrl():PMSMCtrl(), a(0.9898), b(0.0072), c(0.0361), d(1.0), e(0.0149),
225                                r(0.005), Dt(0.000125), rec_hor(10),                                    //for r is a default value rewrited by pcp.txt file value
226                                A(5, 5), B(5, 2), Q(5, 5), R(2, 2),
227                                uab(2), icond(6), MAXu(100.0)   {                       
228                //set fix matrices elements & dimensions
229                A.zeros();
230                        A(0, 0) = A(1, 1) = a;
231                        A(2, 2) = d;
232                        A(2, 4) = d - 1;
233                        A(3, 2) = A(3, 4) = Dt;
234                        A(3, 3) = A(4, 4) = 1.0;
235                B.zeros();
236                        B(0, 0) = B(1, 1) = c;
237                //C.zeros();
238                //      C(0, 0) = C(1, 1) = 1.0;
239                Q.zeros();
240                        Q(2, 2) = 1.0;
241                R.zeros();
242                                                               
243        }
244               
245       
246        virtual vec ctrlaction(const itpp::vec& cond) {
247                PMSMCtrl::ctrlaction(cond); // fills isa,isb,ome,the,Ww
248               
249                int i;
250                lq.resetTime();
251               
252                //create prediction
253                p_isa.zeros();
254                p_isb.zeros();
255                p_ome.zeros();
256                p_the.zeros();
257                p_isa(0) = isa;
258                p_isb(0) = isb;
259                p_ome(0) = ome;
260                p_the(0) = the;
261               
262                for(i = 0; i < rec_hor-1; i++){
263                        p_isa(i+1) = a*p_isa(i) + b*p_ome(i)*sin(p_the(i)) + c*0;//uab(0); //use last used control
264                        p_isb(i+1) = a*p_isb(i) - b*p_ome(i)*cos(p_the(i)) + c*0;//uab(1);
265                        p_ome(i+1) = d*p_ome(i) + e*(p_isb(i)*cos(p_the(i)) - p_isa(i)*sin(p_the(i)));
266                        p_the(i+1) = p_the(i) + Dt*p_ome(i);
267                }
268               
269                //create control matrix
270                for(i = rec_hor; i > 0; i--){           
271                        //set variable matrices elements (A matrix only)
272                        A(0, 2) = b*sin(p_the(i));
273                        A(0, 3) = b*(p_ome(i))*cos(p_the(i));
274                        A(0, 4) = b*sin(p_the(i));
275                        A(1, 2) = -b*cos(p_the(i));
276                        A(1, 3) = b*(p_ome(i))*sin(p_the(i));
277                        A(1, 4) = -b*cos(p_the(i));
278                        A(2, 0) = -e*sin(p_the(i));
279                        A(2, 1) = e*cos(p_the(i));
280                        A(2, 3) = -e*(p_isa(i)*cos(p_the(i)) + p_isb(i)*sin(p_the(i)));
281                       
282                        lq.Models(0).A = A;             
283                        lq.redesign();
284                }
285                lq.redesign();
286               
287                L = lq.getL();
288                icond(0) = isa;
289                icond(1) = isb;
290                icond(2) = ome - Ww;
291                icond(3) = the;
292                icond(4) = Ww;
293                icond(5) = 1;
294                vec tmp = L*icond;                 
295               
296                uab = tmp(0,1);
297               
298                if(uab(0) > MAXu) uab(0) = MAXu;
299                else if(uab(0) < -MAXu) uab(0) = -MAXu;
300                if(uab(1) > MAXu) uab(1) = MAXu;
301                else if(uab(1) < -MAXu) uab(1) = -MAXu;
302               
303                return uab;
304        };
305        void from_setting(const Setting &set){
306                PMSMCtrl::from_setting(set);
307                UI::get(r,set, "r", UI::optional);
308                UI::get(rec_hor,set, "h", UI::optional);
309        }
310
311        void validate(){
312                R(0,0)=R(1,1)=r;
313
314                p_isa.set_length(rec_hor+1);
315                p_isb.set_length(rec_hor+1);
316                p_ome.set_length(rec_hor+1);
317                p_the.set_length(rec_hor+1);
318
319                Array<quadraticfn> qloss(2);
320                qloss(0).Q.setCh(Q);
321                qloss(0).rv = RV("x", 5, 1);
322                qloss(1).Q.setCh(R);
323                qloss(1).rv = RV("u", 2, 0);           
324                lq.Losses = qloss;             
325
326                                //set lq
327                lq.rv = RV("u", 2, 0);                 
328                lq.set_rvc(RV("x", 5, 0));
329                lq.horizon = rec_hor;   
330               
331                Array<linfnEx> model(2);
332                model(0).A = A;
333                model(0).B = vec("0 0 0 0 0");
334                model(0).rv = RV("x", 5, 0);
335                model(0).rv_ret = RV("x", 5, 1);
336                model(1).A = B;
337                model(1).B = vec("0 0");
338                model(1).rv = RV("u", 2, 0);
339                model(1).rv_ret = RV("x", 5, 1);
340                lq.Models = model;
341               
342                lq.finalLoss.Q.setCh(Q);
343                lq.finalLoss.rv = RV("x", 5, 1);
344               
345                lq.validate();
346                                               
347                uab.zeros();
348
349        }
350};
351UIREGISTER(PMSM_LQCtrl);
352
353class PMSM_LQCtrl_dq: public PMSMCtrl{
354public:
355/*
356PMSMCtrl:
357        double isa;
358        double isb;
359        double ome;
360        double the;
361        double Ww;
362*/     
363
364//PMSM parameters
365        const double a;
366        const double b;
367        const double c;
368        const double d;
369        const double e;
370       
371//input penalty
372        double r;
373       
374//time step
375        const double Dt;
376       
377//receding horizon
378        int rec_hor;
379       
380//system matrices
381        mat A; //5x5
382        mat B; //5x2
383        //mat C; //2x5
384        mat Q; //5x5
385        mat R; //2x2   
386       
387//control matrix
388        mat L;
389        vec uab;
390        vec icond;
391       
392//control maximum
393        const double MAXu;
394       
395//lqg controler class
396        LQG_universal lq;       
397       
398//prediction
399        vec p_isa, p_isb, p_ome, p_the;
400               
401        PMSM_LQCtrl_dq():PMSMCtrl(), a(0.9898), b(0.0072), c(0.0361), d(1.0), e(0.0149),
402                                r(0.005), Dt(0.000125), rec_hor(10),                                    //for r is a default value rewrited by pcp.txt file value
403                                A(5, 5), B(5, 2), Q(5, 5), R(2, 2),
404                                uab(2), icond(6), MAXu(100.0)   {                       
405                //set fix matrices elements & dimensions
406                A.zeros();
407                        A(0, 0) = A(1, 1) = a;
408                        A(1, 2) = A(1, 4) = -b;
409                        A(2, 1) = e;
410                        A(2, 2) = d;
411                        A(2, 4) = d - 1;
412                        A(3, 2) = A(3, 4) = Dt;
413                        A(3, 3) = A(4, 4) = 1.0;
414                B.zeros();
415                        B(0, 0) = B(1, 1) = c;
416                //C.zeros();
417                //      C(0, 0) = C(1, 1) = 1.0;
418                Q.zeros();
419                        Q(2, 2) = 1.0;
420                R.zeros();
421                                                               
422        }
423               
424       
425        virtual vec ctrlaction(const itpp::vec& cond) {
426                PMSMCtrl::ctrlaction(cond); // fills isa,isb,ome,the,Ww
427               
428                int i;
429                vec udq;
430                lq.resetTime();
431               
432                //create prediction
433                /*p_isa.zeros();
434                p_isb.zeros();
435                p_ome.zeros();
436                p_the.zeros();
437                p_isa(0) = isa;
438                p_isb(0) = isb;
439                p_ome(0) = ome;
440                p_the(0) = the;
441                               
442                //create control matrix
443                /*for(i = rec_hor; i > 0; i--){                                                         
444                        lq.redesign();
445                }
446                lq.redesign();
447                */
448                L = lq.getL();
449                icond(0) = isa*cos(the) + isb*sin(the);
450                icond(1) = isb*cos(the) - isa*sin(the);
451                icond(2) = ome - Ww;
452                icond(3) = the;
453                icond(4) = Ww;
454                icond(5) = 1;
455                vec tmp = L*icond;                 
456               
457                udq = tmp(0,1);
458               
459                uab = udq; //set size
460                uab(0) = udq(0)*cos(the) - udq(1)*sin(the);
461                uab(1) = udq(1)*cos(the) + udq(0)*sin(the);
462               
463                if(uab(0) > MAXu) uab(0) = MAXu;
464                else if(uab(0) < -MAXu) uab(0) = -MAXu;
465                if(uab(1) > MAXu) uab(1) = MAXu;
466                else if(uab(1) < -MAXu) uab(1) = -MAXu;
467               
468                return uab;
469        };
470        void from_setting(const Setting &set){
471                PMSMCtrl::from_setting(set);
472                UI::get(r,set, "r", UI::optional);
473                UI::get(rec_hor,set, "h", UI::optional);
474        }
475
476        void validate(){
477                R(0,0)=R(1,1)=r;
478
479                p_isa.set_length(rec_hor+1);
480                p_isb.set_length(rec_hor+1);
481                p_ome.set_length(rec_hor+1);
482                p_the.set_length(rec_hor+1);
483
484                Array<quadraticfn> qloss(2);
485                qloss(0).Q.setCh(Q);
486                qloss(0).rv = RV("x", 5, 1);
487                qloss(1).Q.setCh(R);
488                qloss(1).rv = RV("u", 2, 0);           
489                lq.Losses = qloss;             
490
491                                //set lq
492                lq.rv = RV("u", 2, 0);                 
493                lq.set_rvc(RV("x", 5, 0));
494                lq.horizon = rec_hor;   
495               
496                Array<linfnEx> model(2);
497                model(0).A = A;
498                model(0).B = vec("0 0 0 0 0");
499                model(0).rv = RV("x", 5, 0);
500                model(0).rv_ret = RV("x", 5, 1);
501                model(1).A = B;
502                model(1).B = vec("0 0");
503                model(1).rv = RV("u", 2, 0);
504                model(1).rv_ret = RV("x", 5, 1);
505                lq.Models = model;
506               
507                lq.finalLoss.Q.setCh(Q);
508                lq.finalLoss.rv = RV("x", 5, 1);
509               
510                lq.validate();
511                                               
512                uab.zeros();
513               
514                //create control matrix
515                for(int i = rec_hor; i > 0; i--){                                                               
516                        lq.redesign();
517                }
518                lq.redesign();
519        }
520};
521UIREGISTER(PMSM_LQCtrl_dq);
522
523class PMSM_LQCtrl_dq2: public PMSMCtrl{
524public:
525/*
526PMSMCtrl:
527        double isa;
528        double isb;
529        double ome;
530        double the;
531        double Ww;
532*/     
533
534//PMSM parameters
535        const double a;
536        const double b;
537        const double c;
538        const double d;
539        const double e;
540       
541//input penalty
542        double r;
543       
544//time step
545        const double Dt;
546       
547//receding horizon
548        int rec_hor;
549       
550//system matrices
551        mat A; //5x5
552        mat B; //5x2
553        //mat C; //2x5
554        mat Q; //5x5
555        mat R; //2x2   
556       
557//control matrix
558        mat L;
559        vec uab,udq;
560        vec icond;
561       
562//control maximum
563        const double MAXu;
564       
565//lqg controler class
566        LQG_universal lq;       
567       
568//prediction
569        vec p_isd, p_isq, p_ome, p_the;
570               
571        PMSM_LQCtrl_dq2():PMSMCtrl(), a(0.9898), b(0.0072), c(0.0361), d(1.0), e(0.0149),
572                                r(0.005), Dt(0.000125), rec_hor(10),                                    //for r is a default value rewrited by pcp.txt file value
573                                A(5, 5), B(5, 2), Q(5, 5), R(2, 2),
574                                uab(2), udq(2), icond(6), MAXu(100.0)   {                       
575                //set fix matrices elements & dimensions
576                A.zeros();
577                        A(0, 0) = A(1, 1) = a;
578                        A(2, 1) = e;
579                        A(2, 2) = d;
580                        A(2, 4) = d - 1;
581                        A(3, 2) = A(3, 4) = Dt;
582                        A(3, 3) = A(4, 4) = 1.0;
583                B.zeros();
584                        B(0, 0) = B(1, 1) = c;
585                //C.zeros();
586                //      C(0, 0) = C(1, 1) = 1.0;
587                Q.zeros();
588                        Q(2, 2) = 1.0;
589                R.zeros();
590                                                               
591        }
592               
593       
594        virtual vec ctrlaction(const itpp::vec& cond) {
595                PMSMCtrl::ctrlaction(cond); // fills isa,isb,ome,the,Ww
596               
597                int i;
598               
599                lq.resetTime();
600        //cout << "OK" << endl;
601                //create prediction
602                p_isd.zeros();
603                p_isq.zeros();
604                p_ome.zeros();
605                p_the.zeros();
606                p_isd(0) = isa*cos(the) + isb*sin(the);//isa;
607                p_isq(0) = isb*cos(the) - isa*sin(the);//isb;
608                p_ome(0) = ome;
609                p_the(0) = the;
610        //cout << "OKkkk" << endl;     
611                for(i = 0; i < rec_hor-1; i++){
612                        /*p_isa(i+1) = a*p_isa(i) + b*p_ome(i)*sin(p_the(i)) + c*0;//uab(0); //use last used control
613                        p_isb(i+1) = a*p_isb(i) - b*p_ome(i)*cos(p_the(i)) + c*0;//uab(1);
614                        p_ome(i+1) = d*p_ome(i) + e*(p_isb(i)*cos(p_the(i)) - p_isa(i)*sin(p_the(i)));
615                        p_the(i+1) = p_the(i) + Dt*p_ome(i);*/
616                        p_isd(i+1) = a*p_isd(i) + p_isq(i)*p_ome(i)*Dt + c*udq(0);
617                        //cout << "OKaa" << endl;
618                        p_isq(i+1) = -p_isd(i)*p_ome(i)*Dt + a*p_isq(i) - b*p_ome(i) + c*udq(1);
619                        p_ome(i+1) = d*p_ome(i) + e*p_isq(i);
620                        p_the(i+1) = p_the(i) + Dt*p_ome(i);
621                        //cout << "1";
622                }
623               
624                //create control matrix
625                for(i = rec_hor; i > 0; i--){           
626                        //set variable matrices elements (A matrix only)
627                        /*A(0, 2) = b*sin(p_the(i));
628                        A(0, 3) = b*(p_ome(i))*cos(p_the(i));
629                        A(0, 4) = b*sin(p_the(i));
630                        A(1, 2) = -b*cos(p_the(i));
631                        A(1, 3) = b*(p_ome(i))*sin(p_the(i));
632                        A(1, 4) = -b*cos(p_the(i));
633                        A(2, 0) = -e*sin(p_the(i));
634                        A(2, 1) = e*cos(p_the(i));
635                        A(2, 3) = -e*(p_isa(i)*cos(p_the(i)) + p_isb(i)*sin(p_the(i)));*/
636                        A(0, 1) = Dt*p_ome(i);
637                        A(0, 2) = Dt*p_isq(i);
638                        A(0, 4) = Dt*p_isq(i);
639                        A(1, 0) = -Dt*p_ome(i);
640                        A(1, 2) = -Dt*p_isd(i);
641                        A(1, 4) = -Dt*p_isq(i);
642                       
643                        lq.Models(0).A = A;             
644                        lq.redesign();
645                }
646                lq.redesign();
647               
648                L = lq.getL();
649                //icond(0) = isa;
650                //icond(1) = isb;
651                icond(0) = isa*cos(the) + isb*sin(the);
652                icond(1) = isb*cos(the) - isa*sin(the);
653                icond(2) = ome - Ww;
654                icond(3) = the;
655                icond(4) = Ww;
656                icond(5) = 1;
657                vec tmp = L*icond;                 
658               
659                //uab = tmp(0,1);
660                udq = tmp(0,1);
661               
662                uab = udq; //set size
663                uab(0) = udq(0)*cos(the) - udq(1)*sin(the);
664                uab(1) = udq(1)*cos(the) + udq(0)*sin(the);
665               
666                if(uab(0) > MAXu) uab(0) = MAXu;
667                else if(uab(0) < -MAXu) uab(0) = -MAXu;
668                if(uab(1) > MAXu) uab(1) = MAXu;
669                else if(uab(1) < -MAXu) uab(1) = -MAXu;
670               
671                return uab;
672        };
673        void from_setting(const Setting &set){
674                PMSMCtrl::from_setting(set);
675                UI::get(r,set, "r", UI::optional);
676                UI::get(rec_hor,set, "h", UI::optional);
677        }
678
679        void validate(){
680                R(0,0)=R(1,1)=r;
681
682                p_isd.set_length(rec_hor+1);
683                p_isq.set_length(rec_hor+1);
684                p_ome.set_length(rec_hor+1);
685                p_the.set_length(rec_hor+1);
686
687                Array<quadraticfn> qloss(2);
688                qloss(0).Q.setCh(Q);
689                qloss(0).rv = RV("x", 5, 1);
690                qloss(1).Q.setCh(R);
691                qloss(1).rv = RV("u", 2, 0);           
692                lq.Losses = qloss;             
693
694                                //set lq
695                lq.rv = RV("u", 2, 0);                 
696                lq.set_rvc(RV("x", 5, 0));
697                lq.horizon = rec_hor;   
698               
699                Array<linfnEx> model(2);
700                model(0).A = A;
701                model(0).B = vec("0 0 0 0 0");
702                model(0).rv = RV("x", 5, 0);
703                model(0).rv_ret = RV("x", 5, 1);
704                model(1).A = B;
705                model(1).B = vec("0 0");
706                model(1).rv = RV("u", 2, 0);
707                model(1).rv_ret = RV("x", 5, 1);
708                lq.Models = model;
709               
710                lq.finalLoss.Q.setCh(Q);
711                lq.finalLoss.rv = RV("x", 5, 1);
712               
713                lq.validate();
714                                               
715                uab.zeros();
716                udq.zeros();
717
718        }
719};
720UIREGISTER(PMSM_LQCtrl_dq2);
721
722/*!@}*/
723#endif //PMSM_CTR_H
Note: See TracBrowser for help on using the browser.