AM263x Digital Power SDK  09.01.00
dcl_zpk3.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Texas Instruments Incorporated - https://www.ti.com/
3  *
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions
7  * are met:
8  *
9  * * Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * * Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the
15  * distribution.
16  *
17  * * Neither the name of Texas Instruments Incorporated nor the names of
18  * its contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
26  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
27  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
28  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
29  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
30  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
31  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32  */
33 
34 #ifndef _DCL_ZPK3_H_
35 #define _DCL_ZPK3_H_
36 
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40 
50 #include <complex.h>
51 
52 //--- ZPK3 structure ---------------------------------------------------------
53 
61 typedef struct dcl_zpk3
62 {
63  float complex z1;
64  float complex z2;
65  float complex z3;
66  float complex p1;
67  float complex p2;
68  float complex p3;
70 } DCL_ZPK3;
71 
74 #define ZPK3_DEFAULTS { 0.0f + 0.0f*I, 0.0f + 0.0f*I, 0.0f + 0.0f*I, \
75  0.0f + 0.0f*I, 0.0f + 0.0f*I, 0.0f + 0.0f*I, \
76  1.0f }
77 
80 {
81  return((cabsf(q->p1) < 1.0f) && (cabsf(q->p2) < 1.0f) && (cabsf(q->p3) < 1.0f));
82 }
83 
84 // \brief All ZPK functions exist in its respective controller conversion type
85 // All the ZPK conversion function prototypes are listed below
86 /*
91 extern void DCL_loadDF11asZPK(DCL_DF11 *p, DCL_ZPK3 *q);
92 
96 extern void DCL_loadDF13asZPK(DCL_DF13 *p, DCL_ZPK3 *q);
97 
102 extern void DCL_loadDF22asZPK(DCL_DF22 *p, DCL_ZPK3 *q);
103 
107 extern void DCL_loadDF23asZPK(DCL_DF23 *p, DCL_ZPK3 *q);
108 
114 extern void DCL_loadSeriesPIasZPK(DCL_PI *p, DCL_ZPK3 *q);
115 
120 extern void DCL_loadParallelPIasZPK(DCL_PI *p, DCL_ZPK3 *q);
121 
126 extern void DCL_loadSeriesPIDasZPK(DCL_PID *p, DCL_ZPK3 *q);
127 
132 extern void DCL_loadParallelPIDasZPK(DCL_PID *p, DCL_ZPK3 *q);
133 */
134 
137 #ifdef __cplusplus
138 }
139 #endif // extern "C"
140 
141 #endif // _DCL_ZPK3_H_
DCL_ZPK3::K
float32_t K
Real gain.
Definition: dcl_zpk3.h:69
DCL_ZPK3::z2
float complex z2
Complex zeros 2.
Definition: dcl_zpk3.h:64
DCL_ZPK3::p2
float complex p2
Complex poles 2.
Definition: dcl_zpk3.h:67
_DCL_CODE_ACCESS
#define _DCL_CODE_ACCESS
Defines the scope of dcl functions (static inline/extern inline/none)
Definition: dcl_common.h:58
DCL_ZPK3::p1
float complex p1
Complex poles 1.
Definition: dcl_zpk3.h:66
DCL_isStableZpk3
_DCL_CODE_ACCESS bool DCL_isStableZpk3(DCL_ZPK3 *q)
Definition: dcl_zpk3.h:79
DCL_ZPK3::z3
float complex z3
Complex zeros 3.
Definition: dcl_zpk3.h:65
DCL_ZPK3::p3
float complex p3
Complex poles 3.
Definition: dcl_zpk3.h:68
DCL_ZPK3
Defines the DCL_ZPK3 controller structure.
Definition: dcl_zpk3.h:62
float32_t
float float32_t
Defines single,double precision data type. Note: Assumes ABI to be TI_EABI, does not support legacy T...
Definition: dcl_common.h:54
DCL_ZPK3::z1
float complex z1
Complex zeros 1.
Definition: dcl_zpk3.h:63