Article A New Active Control Driver Circuit for Satellite’s Torquer System Using Second Generation Current Conveyor

Vijay Kumar Verma 1,2, Rajeev Kumar Ranjan 2 , Pallav Prince 1, Bhargav Appasani 3 , Nicu Bizon 4,5,6,* and Phatiphat Thounthong 7,8

1 U. R. Rao Satellite Centre, Indian Space Research Organization (ISRO), Bangalore 560231, India; [email protected] (V.K.V.); [email protected] (P.P.) 2 Department of Electronics Engineering, Indian Institute of Technology (ISM), Dhanbad 826004, India; [email protected] 3 School of Electronics Engineering, Kalinga Institute of Industrial Technology, Bhubaneswar 751024, India; [email protected] 4 Faculty of Electronics, Communication and Computers, University of Pitesti, 110040 Pitesti, Romania 5 ICSI Energy, National Research and Development Institute for Cryogenic and Isotopic Technologies, 240050 Ramnicu Valcea, Romania 6 Polytechnic University of Bucharest, 313 Splaiul Independentei, 060042 Bucharest, Romania 7 Renewable Energy Research Centre (RERC), Department of Teacher Training in Electrical Engineering, Faculty of Technical Education, King Mongkut’s University of Technology North Bangkok, 1518 Pracharat 1 Road, Wongsawang, Bangsue, Bangkok 10800, Thailand; [email protected] 8 Group of Research in Electrical Engineering of Nancy (GREEN), University of Lorraine,  2 Avenue de la Forêt de Haye, 54518 Vandeuvre lès Nancy, CEDEX, F-54000 Nancy, France  * Correspondence: [email protected]

Citation: Verma, V.K.; Ranjan, R.K.; Prince, P.; Appasani, B.; Bizon, N.; Abstract: In this article a new active control driver circuit is designed using the second-generation Thounthong, P. A New Active current conveyor for the satellite’s torquer system. The torquer plays an important role in the attitude Control Driver Circuit for Satellite’s control of the satellite. Based on the magneto-meter data, the satellite’s microprocessor calculates Torquer System Using Second the required current for the torque and sends a reference command. A close loop control system is Generation Current Conveyor. designed, which generates the desired output current. The parameters of the controller are optimized Electronics 2021, 10, 911. https:// using a variant of the well-known evolutionary algorithm, the genetic algorithm (GA). This variant is doi.org/10.3390/electronics10080911 known as the segmented GA. The controller is experimentally implemented using the commercially available , the AD844. The error between the experimental and simulation results Academic Editors: Thaiyal has RMS values in range of 0.01–0.16 A for the output current and 0.41–0.6 V for the output voltage. Naayagi Ramasamy and Padmanabhan Balasubramanian It has mean value of 0.01 A for the output current and has mean values in the range of 0.33–0.48 V for the output voltage. It has standard deviation of 0.01 A for the output current and standard

Received: 8 March 2021 deviations in the range of 0.24–0.35 V for the output voltage. Thus, there is a close match between Accepted: 7 April 2021 the simulation and experimental results, validating the design approach. These designs have many Published: 11 April 2021 practical applications, particularly for nanosatellites powered by photovoltaic panels.

Publisher’s Note: MDPI stays neutral Keywords: second generation current conveyor; torquer system; satellite; genetic algorithm with regard to jurisdictional claims in published maps and institutional affil- iations. 1. Introduction A satellite’s altitude and position control are significant for its safe maneuvering that has received significant attention of the design engineers [1]. It is important to control Copyright: © 2021 by the authors. the attitude of the satellite so that the instruments or the equipment they carry can be Licensee MDPI, Basel, Switzerland. pointed in the desired direction [2]. There are many devices for the attitude control of a This article is an open access article satellite, such as the thrusters, spin stabilization, momentum wheels, control moment gyros, distributed under the terms and solar sails, gravity gradient stabilization, magnetic torquers, etc. [3]. All of these attitude conditions of the Creative Commons control devices are called “actuators.” Several factors, such as, the satellite dimensions, Attribution (CC BY) license (https:// satellite’s operating time, satellite’s mission, etc., are to be considered for choosing an creativecommons.org/licenses/by/ appropriate actuator. 4.0/).

Electronics 2021, 10, 911. https://doi.org/10.3390/electronics10080911 https://www.mdpi.com/journal/electronics Electronics 2021, 10, 911 2 of 12

A magnetic torquer is a simple current carrying coil that can generate the desired magnetic moment [4]. The torquer is mounted on the satellite and the interaction between the magnetic moments of the torquer and the Earth’s magnetic field produces a torque on the satellite. Thus, by controlling the resultant magnetic moment of a system of torquers it is possible to control the satellite’s attitude. Three attitude controllers were proposed in [5] based on the linear-time varying approach. Linear quadratic regulators (LQRs) were used for the stabilization of the satellite using the magnetic torquers [6]. Another optimal LQ control was proposed in [7] for achieving the attitude control of the satellite using the magnetic torquers. An extended Kalman filtering based deterministic batch algorithm was proposed by Challa et al. for the control of satellite using the measurements from the magnetometers of an Earth radiation budget satellite (ERBS) in [8]. A similar approach was proposed by the same author in [9] for the control of a spinning spacecraft. Another predictive filter was developed for the attitude control of the satellite in real-time [10]. A modified state-dependent Riccati equation was proposed in [11], where the attitude data was obtained using the magnetometers and the control was achieved using the magnetic torquers. Proportional-derivative (PD) controller based active control system was proposed in [12] for the magnetic attitude control. PD controller and an extended Kalman filter based three axis attitude control of the satellite was proposed in [13]. PD controller was also used for the attitude control of the ZDPS-1A pico-satellite using three-axis magnetic torquers [14]. Another PD controller was designed for the spacecraft stabilization, taking into account the delay between the measurement and the actuation [15]. The magneto-meter data was used for finding the magnetic torque required to stabilize a CubeSat using a detumbling algorithm [16]. A backstepping controller was proposed in [17] for the attitude control of the satellite. The recent developments in the integrated circuit (IC) fabrication and embedded system technology contributed to the design of efficient control circuits. The modern control systems need several digital and analog circuits on a single chip that has motivated the researchers to design more efficient designs [18]. Active control circuits based on second generation current conveyors, popularly referred to as CCIIs, have been widely adopted in the past few years [19]. CCII was used for the synthesis of transfer function [20], design of filters [21], oscillators [22,23], controllers [24–26], etc. In [24], CCII based active control circuit was experimentally demonstrated for a physical system, whose control parameters were obtained using a series expansion method. The same series expansion method was extended for designing CCII controllers for a two-input two-output (TITO) system in [25]. A proportional-integral-derivative (PID) controller was designed using CCII and particle swarm optimization (PSO) in [26]. In this article a CCII based active control driver circuit is designed for the satellite’s torquer system, to control its attitude. The proposed driver circuit is simulated using the ORCAD Pspice and a prototype is designed using the commercially available CCII, the AD844. Moreover, the parameters pertaining to the active control circuit are obtained using the optimization algorithm, the segmented genetic algorithm (SGA). Therefore, the novelty of this study can be summarized as follows: (1) a new active control driver is designed and tested for the satellite’s torquer system; (2) an objective function (based on the steady state error and the settling time) is proposed for the SGA algorithm to find the optimal values for the controllers’ parameters. The manuscript is conceived in the following sections. The description of the torquer system and its modeling. This section also describes the CCII and the block diagram of the proposed controller. The third section describes the SGA, along the optimization results. These optimized parameters are used for designing the practical control circuit, whose results are reported in Section4. Lastly, the conclusion is given at the end of the work. Electronics 2021, 10, x FOR PEER REVIEW 3 of 13 Electronics 2021, 10, 911 3 of 12

Electronics 2021, 10, x FOR PEER REVIEW 3 of 13 2. Overview of the CCII, Torquer and the Control Arrangement 2. Overview of the CCII, Torquer and the Control Arrangement 2.1. Second Generation Current Conveyor 2.1. Second Generation Current Conveyor The CCII was first introduced by Sedra and Smith in the year 1968 [27]. It has a high 2. OverviewThe CCII of wasthe CCII, first introducedTorquer and by the Sedra Control and Arrangement Smith in the year 1968 [27]. It has a gain bandwidth product and it consumes less power than its voltage counterpart the op- high gain bandwidth product and it consumes less power than its voltage counterpart erational2.1. Second Generation (OPAMP) Current [28].Conveyor The schematic of the CCII is shown in Figure 1. It has the operational amplifier (OPAMP) [28]. The schematic of the CCII is shown in Figure1. three Theterminals: CCII was the inputfirst introduced terminals areby SedraX and andY. The Smith output in the terminal year 1968 is Z. [27].The relationshipIt has a high It has three terminals: the input terminals are X and Y. The output terminal is Z. The betweengainrelationship bandwidth the inputs between product and the outputs and inputs it consumesis and given outputs by less equation ispower given (1) than by [29]. Equation its Commercially,voltage (1) counterpart [29]. Commercially, this is the avail- op- ableerationalthis in is the available amplifier form of in AD844 the(OPAMP) form [30]. of [28]. AD844 The [ 30schematic]. of the CCII is shown in Figure 1. It has three terminals: the input terminals are X and Y. The output terminal is Z. The relationship iv000 between the inputs and outputs i is givenyy by0 equation 0 0  (1) [29].v  Commercially, this is avail- y  y able in the form of AD844 [30]. v vi== 1001 0 0 i (1)  xx   x x  (1) iziv 0100 ±1 0 vz ivzzyy  000   vi= 100  x  x (1) ± ivzz 010 

FigureFigure 1. 1. BlockBlock diagram diagram of of current current conveyor. conveyor.

2.2.2.2. Torquer Torquer System System and and its its Modeling Modeling FigureTheThe 1. Blocktorquer torquer diagram is is responsible of current conveyor. forfor thethe attitude attitude control control of of the the satellite. satellite. The The satellite’s satellite’s on- onboardboard micro-controller micro-controller takes take thes the measurement measurement data data from from the the magneto-meters magneto-meters and and generates gen- erates2.2.the Torquer reference the reference System command and command its that Modeling is that fed asis anfed input as an to input the torquer’s to the torquer’ driver circuit.s driver The circuit. output The of outputthe driverThe of thetorquer circuit driver isis circuit fedresponsible to theis fed torquer, tofor the the whichto rquer,attitude controls which control thecontrols satellite’sof the the satellite. satellite’s attitude. The attitude. satellite’s onboardTheThe desiredmicro-controller desired torque torque is is takegenerated generateds the measurement by by passing passing the thedata required required from the electric electric magneto-meters current current through through and gen- the the torquereratestorquer the by by referenceapplying applying acommand voltage a voltage across that across is it. fed it.Thus, as Thus, anit isinput it necessary is necessary to the to torquer’ study to study sthe driver relationship the relationshipcircuit. Thebe- tweenoutputbetween the of thethevoltage voltagedriver applied circuit applied to is the tofed the torquer to torquerthe to andrquer, and the the which current current controls flowing flowing the through throughsatellite’s it. it. Theattitude. The torquer torquer coilcoil has hasThe some somedesired specific specific torque resistance resistance is generated RR andand by an an passing inductance inductance the requiredLL. .Thus, Thus, theelectric the torquer torquer current can can bethrough be modeled modeled the astorqueras a aseries series by RLapplyingRL circuitcircuit aas asvoltage shown shown across in in Figure Figure it. Thus, 2.2. The The it isel electric ectricnecessary current current to study response the relationship to to the applied be- voltagetweenvoltage the is is specified voltage specified applied by by the the transfer transferto the torquer function function and given given the bycurrent by equation Equation flowing (2). (2). through it. The torquer coil has some specific resistance R and an inductance L. Thus, the torquer can be modeled 1 as a series RL circuit as shown in FigureI(s) = 2. The elVectric(s) current response to the applied(2) R + sL in voltage is specified by the transfer function given by equation (2).

Figure 2. Basic model of torquer system.

1 Figure 2. Basic model of torquer system.I ()sVs= () (2) Figure 2. Basic model of torquer system. RsL+ in TheThe torquer torquer used used for for the the present present work work belongs belongs1 to to a a nanosatellite nanosatellite and and has has the the param- parame- ters that are shown in Table1. The activeI()sVs= control circuit () designed in this manuscript is(2) for eters that are shown in Table 1. The active coRsL+ntrol circuitin designed in this manuscript is forthis this torquer. torquer. However, However, the the approach approach developed developed in thisin this manuscript manuscript is applicable is applicable for for any anyother otherThe torquer torquertorquer system. usedsystem. Basedfor Basedthe on present theseon these parameters,work parame belongsters, the to transferthe a nanosatellite transfer function function and of the has of torquerthe the torquer param- used usedetersfor this forthat studythis are study shown is given is givenin by Table Equation by 1.equation The (3). active (3). control circuit designed in this manuscript is for this torquer. However, the approach deve1 loped in this manuscript is applicable for I(s) = V (s) (3) any other torquer system. Based on these38 parame+ 0.018ters,s in the transfer function of the torquer used for this study is given by equation (3).

Electronics 2021, 10, x FOR PEER REVIEW 4 of 13

Electronics 2021, 10, x FOR PEER REVIEW 4 of 13

1 I()sVs= () (3) 38+1 0.018s in I()sVs= () (3) 38+ 0.018s in Electronics 2021, 10, 911 Table 1. Parameters of the torquer used in this study. 4 of 12

Table 1. Parameters of the torquer used Parameter in this study. Value 2 Table 1. Parameters of the torquer Magnetic used in Parameter thisdipole study. moment, Am Value0.15 Magnetic Coil dipole resistance, moment, Ohm Am 2 0.15 38 Parameter Value Coil Coil resistance, inductance, Ohm mH 38 18 Magnetic dipole moment, Am Number2 of turns 0.15 370 Coil resistance, Ohm Coil inductance, mH 38 18 Coil inductance, mH Number of turns 18 370 2.3. GeneralizedNumber Control of turns Block Diagram 370 2.3. GeneralizedA basic control Control arrangement Block Diagram is shown in the Figure 3, where the control circuit con- 2.3. Generalized Control Block Diagram trolsA the basic system control to give arrangement the desired is shownoutput inbased the Figureon the reference3, where thecommand control input.circuit con- A basic control arrangement is shown in the Figure3, where the control circuit controls trolsthe systemthe system to give to the give desired the output desired based output on the based reference on commandthe reference input. command input. Manipulated Command Intelligent Variable Response Control System Input Manipulated Variable Command IntelligentCircuit Variable Response Control System (Controlled Input VariableOutput) Circuit (Controlled Output) Sensor Sensor Figure 3. Control system block diagram. FigureFigure 3. 3. Control system system block block diagram. diagram. The same concept is used in this article to control the current in the torquer system. A driverThe same is designed concept is for used the in supervisory this article to control control the of current the torquer in the torquer system’s system. current. This can A driverThe issame designed concept for the is supervisory used in this control article of the to torquercontrol system’s the current current. in This the can torquer system. Abebe driver an openopen is loopdesigned loop or closedor closed for loop the loop control.supervisory control. In most Incont of mo therol satellites,st ofof thethe torquerlinearsatellites, control system’s linear is used controlcurrent. for is This used can for beachievingachieving an open the theloop attitude attitude or closed control control usingloop using thecontrol. torquer. the Intorque For mo linearstr. of For control, the linear satellites, the control, architecture linear the shown controlarchitecture is used shown for achievinginin Figure 4 theis4 proposedis attitude proposed for control controlling for controlling using the the torquer torquethe system.torquerr. For system. linear control, the architecture shown in Figure 4 is proposed for controlling the torquer system. Reference + 1 K1 Output input + Reference + 381 0.018s - K1 Output input 38+ 0.018s - K2

K2 FigureFigure 4.4.Proposed Proposed architecture architecture for the for control the co ofntrol torquer’s of torquer’s current mode. current mode. Figure 4. Proposed architecture for the control of torquer’s current mode. Two proportional controllers are used: one in the forward loop (K1) and the other in Two proportional controllers are used: one in the forward loop (K1) and the other in the feedback loop (K2) for the closed loop control. An open loop control can be achieved theby removingfeedbackTwo proportional the loop proportional (K2) controllersfor the controller closed are in loopused: thefeedback control. one in loop. theAn forwardopen The parameters loop loop control (K of1) theand can thebe achievedother in proportional gains in the forward loop and the feedback loop are obtained using the SGA theby feedbackremoving loop the proportional(K2) for the closed controller loop in control. the feedback An open loop. loop The control parameters can be of achieved the pro- portionaland these controllers gains in the are implementedforward loop using and the the CCIIs. feedback loop are obtained using the SGA and by removingFor the control the proportional of the torquer system,controller the advantagesin the feedback of using loop. CCII The as compared parameters to of the pro- these controllers are implemented using the CCIIs. portionalthe operational gains amplifier in the forward (OPAMP) loop are: and the feedback loop are obtained using the SGA and For the control of the torquer system, the advantages of using CCII as compared to these1. CCIIcontrollers architecture are offersimplemented better performance, using the high CCIIs. linearity, and an exceptionally clean the operationalForpulse the response control amplifier when of the compared (OPAMP)torquer to thesystem, are: OPAMP. the advantages of using CCII as compared to the2. operationalWith1. the CCII,CCII amplifier the architecture closed-loop (OPAMP) offers bandwidth are: better is determinedperformanc primarilye, high bylinearity, the feedback and an exception- resistor1. andCCIIally is cleanarchitecture almost pulse independent response offers of better the when closed-loop performanc compared gain.e, to Ithigh isthe also linearity, OPAMP. free from and the an exception- slew2. rate limitationsWith the inherentCCII, the in traditionalclosed-loop OPAMPs. bandwi Additionally,dth is determined in the OPAMP, primarily by the the bandwidthally clean is limited pulse by response the gain. when compared to the OPAMP. 3. With2. CCII Withfeedback feedback the CCII, isresistor in the the form and closed-loop ofis current.almost CCIIindependbandwi respondsdthent is toof determined an the error closed-loop current primarily at gain. Itby is thealso one of itsfeedback inputfree from terminals, resistor therather slew andthan rate is analmost limitations error voltageindepend inherent (as inent OPAMP) of in the traditional andclosed-loop produces OPAMPs. a gain. It is Addi- also correspondingfreetionally, from output inthe voltage. the slew OPAMP, rate limitations the bandwidth inherent is limited in traditional by the gain. OPAMPs. Addi- 3. tionally,With CCII in thefeedback OPAMP, is in the the bandwidth form of current. is limited CCII by responds the gain. to an error cur- 3. Withrent atCCII one feedback of its input is in terminals, the form rather of current. than anCCII error responds voltage to (as an in error OPAMP) cur- rentand at produces one of its a inputcorresponding terminals, output rather voltage.than an error voltage (as in OPAMP) and produces a corresponding output voltage.

Electronics 2021, 10, 911 5 of 12

3. Segmented Genetic Algorithm Electronics 2021, 10, x FOR PEER REVIEW 5 of 13 This genetic algorithm (GA) is a widely used evolutionary optimization algorithm [31]. In GA an initial population containing of several individuals is taken that are encoded as3. Segmented chromosomes. Genetic These Algorithm chromosomes evolve over a certain number of generations. This evolutionThis genetic is based algorithm on the (GA) following is a widely processes: used evolutionary optimization algorithm •[31]. SelectionIn GA an :initial This population is the first containing step in which of several few individuals individuals is taken are that selected are en- from the previous coded as chromosomes. These chromosomes evolve over a certain number of generations. This evolutiongeneration is based based on onthe following the fitness processes: value. This fitness value is a measure of how close the individual• Selection is: to This the is optimumthe first step value. in which few individuals are selected from the • Crossoverprevious: This generation is the second based on step the fitnes in whichs value. the This individuals fitness value is selected a meas- in the previous step areure used of how for close generating the individual the is offspring. to the optimum value. • • Mutation:CrossoverThis: This step is isthe the second last step step in inwhich which the individuals the individuals selected in are the randomly pre- mutated. vious step are used for generating the offspring. These• Mutation: three steps This arestep repeatedis the last overstep in several which the generations individuals are and randomly the individuals evolve continuously.mutated. Numerous variants of GA have been proposed to improve its performance. SegmentedThese three GA steps (SGA) are isrepeated one such over techniqueseveral generations whose and superior the individuals performance evolve has been demon- continuously. Numerous variants of GA have been proposed to improve its performance. stratedSegmented [32 ].GA (SGA) is one such technique whose superior performance has been demonstratedIn the SGA, [32]. the chromosome set is divided into two sets: set 1 and set 2. These two sets ofIn chromosomesthe SGA, the chromosome are alternatively set is divided optimized. into two sets: The set flowchart 1 and set 2. ofThese this two technique is shown insets Figure of chromosomes5. are alternatively optimized. The flowchart of this technique is shown in Figure 5.

Figure 5. Flowchart of the proposed segmented genetic algorithm (SGA). Figure 5. Flowchart of the proposed segmented genetic algorithm (SGA).

The parameters of the proportional controllers shown in Figure4 were obtained using the SGA. As the system is a first order system and the controller is of proportional type,

there is no overshoot in the output. Therefore, the criterion is to reduce the steady state error and the settling time. The objective function is given below:

F = s2 + e2 (4) Electronics 2021, 10, x FOR PEER REVIEW 6 of 13

The parameters of the proportional controllers shown in Figure 4 were obtained us- ing the SGA. As the system is a first order system and the controller is of proportional type, there is no overshoot in the output. Therefore, the criterion is to reduce the steady Electronics 2021, 10, 911 state error and the settling time. The objective function is given below: 6 of 12

Fs=+22 e (4)

where s is the settling time and e is the steady state error. To demonstratedemonstrate the efficacyefficacy of thethe proposed algorithm, its its pe performancerformance is is compared compared with with that that of of the GA, PSO, firefly firefly algorithm (FA), andand batbat algorithmalgorithm (BA). (BA). All All the the algorithms algorithms are are initialized initialized with with the the following follow- ingparameters: parameters: maximum maximum iterations: iterations: 30; number 30; number of variables: of variables: 2; size 2; of size thepopulation: of the population: 10. The 10.other The parameters other parameters of these algorithmsof these algorithms are given are in Appendixgiven in AppendixA. No special A. No effort special was takeneffort wasin fine taken tuning in fine the parameterstuning the parameters of the various of the algorithms. various algorithms. These optimization These optimization algorithms algorithmswere implemented were implemented in MATLAB in MATLAB and the optimized and the optimized parameters parameters of the controllers of the control- were lersobtained were obtained by minimizing by minimizing the cost functionthe cost function given in given Equation in equation (4) using (4) theseusing algorithms.these algo- rithms.The step The responses step responses obtained obtained using theseusing algorithmsthese algorithms are shown are shown in the in Figure the Figure6 and 6 theand thecomparison comparison of different of different optimization optimization techniques techniques in terms in terms of settling of settling time time and steadyand steady state stateerror error are shown are shown in Table in Table2. 2.

Step Response 1

0.9

0.8 SGA (6 segments) FA 0.7 SGA (10 segments) GA 0.6 SGA (2 segments) 0.5 BA PSO 0.4 Amplitude

0.3

0.2

0.1

0 0 0.1 0.2 0.3 0.4 0.5 0.6 Time (milliseconds)

Figure 6. Step response using several optimization techniques. FA: firefly algorithm; BA: bat Figurealgorithm; 6. Step PSO: response particle using swarm several optimization. optimization techniques. FA: firefly algorithm; BA: bat algo- rithm; PSO: particle swarm optimization. Table 2. Comparison of different optimization techniques. Table 2. Comparison of different optimization techniques. Optimization Technique Settling Time (ms) Steady-State Error (%) Optimization Technique Settling Time (ms) Steady-State Error (%) GA GA 0.186 0.186 10% 10% SGA SGA (2 segments)(2 segments) 0.203 0.203 10.9% 10.9% SGA (6 segments) 0.141 7.6% SGA (6 segments) 0.141 7.6% SGA (10 segments) 0.122 6.6% SGAPSO (10 segments) 0.151 0.122 8.1% 6.6% FA PSO 0.16 0.151 8.6% 8.1% BA FA 0.227 0.16 12.3% 8.6% SGA: segmented genetic BA algorithm; GA: genetic algorithm. 0.227 12.3% SGA: segmented genetic algorithm; GA: genetic algorithm. From the figure and from the results shown in Table2, it can be clearly observed that theFrom SGA the withfigure 10 and segments from the is results better thanshown the in other Table algorithms 2, it can be inclearly terms observed of reducing that thethe SGA steady with state 10 segments error. We is canbetter also than observe the other that algorithms some of the in terms algorithms of reducing perform the steady better statethan error. the GA, We but can theiralso observe performance that some is still of the inferior algorithms to that perform of the SGA better with than 10 the segments. GA, but theirAdditionally, performance it can is be still observed inferior that to that the numberof the SGA of segments with 10 segments. affects the Additionally, performance ofit can the beSGA. observed By proper that choicethe number of this of parameter, segments weaffects can the improve performance the optimization of the SGA. performance. By proper The parameters of the proportional gains obtained using the SGA are K1 = 22.94 and K2 = 23.45.

4. Control Driver Circuit Design The control circuits based on the optimized values obtained in the previous section are designed using the CCIIs. The control driver circuit in the closed loop architecture is shown in the Figure7. The current flowing through the torquer is sensed using the sense resistor. This information is again fed back as a negative feedback to ensure the required current Electronics 2021, 10, x FOR PEER REVIEW 7 of 13

choice of this parameter, we can improve the optimization performance. The parameters of the proportional gains obtained using the SGA are K1 = 22.94 and K2 = 23.45.

4. Control Driver Circuit Design The control circuits based on the optimized values obtained in the previous section Electronics 2021, 10, 911 7 of 12 are designed using the CCIIs. The control driver circuit in the closed loop architecture is shown in the Figure 7. The current flowing through the torquer is sensed using the sense resistor. This information is again fed back as a negative feedback to ensure the required incurrent the torquer in the system.torquer system. By changing By changing the tunable the tunable resistance resistance R3, three R3, different three different operational oper- rangesational can ranges be selected can be as selected follows: as 15 follows: V (400 mA),15 V 25(400 V (650mA), mA), 25 V and (650mA), 40 V (1 A).and Simulation 40 V (1A). andSimulation experimental and experimental validations arevalidations obtained are for obtained all three operationalfor all three ranges.operational ranges.

R11

Torquer Supply R2

R10 R1 Q2 X R7 AD844 Z Q1 Y Q

R8 R9 D/A

Reference Torquer Command from Processor

R4

R3 X Z AD844 Y R5 R6 Rsensor

FigureFigure 7. 7.Control Control driver driver circuit circuit in in closed closed loop loop configuration. configuration.

TheThe circuitcircuit shownshown in the Figure Figure 8 is the the equiva equivalentlent of of the the close close loop loop control control circuit. circuit. As Electronics 2021, 10, x FOR PEER REVIEW 8 of 13 Asin inthe the previous previous section, section, it is it already is already explained explained that that the thetransistors Q1 and Q1 andQ2 are Q2 only areonly used usedto provide to provide the current the current gain gain(β). (β).

R2

R1 X Ix AD844 Z β VL Vin Y Iz IL Iy ILf D to A Converter

Reference Command from Processor R4

R3 X Z AD844 Ixf Vs Vf Izf Y Vsf Iyf R5 R6 Rsensor

FigureFigure 8.8. EquivalentEquivalent ofof thethe closeclose looploop controlcontrol circuit.circuit.

BasedBased on the command command voltage voltage signal, signal, the the driv driverer circuit circuit will will give give a small a small output output cur- current,rent, which which will will be amplified be amplified by the by thecurrent current gain gain (β), (therebyβ), thereby delivering delivering the desired the desired cur- currentrent to the to the torquer. torquer. For For deriving deriving the thetransfer transfer function function model, model, the thevarious various parameters parameters that will be used are shown in the Figure 8. The following are the equations for deriving the transfer function model: == iiyyf00 == = = vvvx yinxfyfs& v v v (5) == iizx i xfzf i vv− vv− =−finin L ix (6) RR12 v 12+=+f  12 +  vvin L   (7) R12RR 1  RRL 2 

vv− v =−fs s ixf (8) R43R vv−− v v =−s ffin izf (9) RR41 12 11++2R1 + RRRR RR iv=−4224 34 v L 1 RR2224 RRin R R RR sf (10) +++1121LL1 + + + 12  2 R4 R 2 RR 24 R 4 R 2 RR 24 R iiv=⋅β & =6 ⋅ v Lf L s+ sf (11) RR56

Electronics 2021, 10, 911 8 of 12

that will be used are shown in the Figure8. The following are the equations for deriving the transfer function model:

 =   i =   iy 0   y f 0  vx = vy = vin & vx f = vy f = vs (5)     iz = ix ix f = iz f

v f − vin vin − vL ix = − (6) R1 R2     1 2 v f 1 2 vin + = + vL + (7) R1 R2 R1 RL R2

v f − vs vs ix f = − (8) R4 R3

vs − v f v f − vin iz f = − (9) Electronics 2021, 10, x FOR PEER REVIEW R4 R1 9 of 13 " 1 + 1 + 2R1 # " 1 + 2 # R4 R2 R2R4 R3 R4 iL = vin − vs f (10) 1 + R1 + RL + 2R1R2 1 + 2R1 + 2RL + 4R1R2 2 R4 R2 R2R4 R4 R2 R2R4 112R 12 R ++ 1 β + R6 6 i =β·i&v = ·v (11) RRRR L f L RRs R + RRR + s f =−β 4224 345 566 ILf VVin sf (12) R R2224 RR R R RR  R   1 1121LL" 1 1 2R1 # 1 122 6 ++++ + 1 + +β +R + R R +R R4 R2 R2R4 3 4 5 6 2 RRRRIL f = β RRRRVin −  Vs f (12) 42241 + R1 + RL +2R1R2 42241 + 2R1 + 2RL + 4R1R2 2 R4 R2 R2R4 R4 R2 R2R4 Equation (12) shows that the final load current depends on the input voltage and the Equation (12)feedback shows voltage. that the Forfinal a load given current reference depends input, on the the required input voltage current and will the flow in the load. feedback voltage.The For increase a given or reference decrease ininput, the loadthe required current duecurrent to the will noise flow will in the be compensatedload. by the The increase orfeedback decrease voltage, in the load and current thus, the due desired to the current noise will will be flow compensated in the torquer by system.the feedback voltage, and thus, the desired current will flow in the torquer system. 5. Simulations and Experimental Results 5. Simulations and TheExperimental active control Results circuit was assembled on a breadboard and the prototype was tested The activeon control the torquer circuit system. was assembled The CCII on was a implementedbreadboard and using the theprototype AD844 IC,was Q1 is tested on the torquerNPN 2N3701, system. transistorThe CCII was Q2 is implemented the PNP 2N5679 using and the the AD844 transistor IC, transistor Q is the NPN 2N5672. Q1 is NPN 2N3701,Both the transistor control circuitQ2 is the and PN theP torquer2N5679 are and shown the transistor in Figure 9Q. is the NPN

(a) (b)

Figure 9. ExperimentalFigure 9. set-up:Experimental (a) control set-up: circuit; (a) ( controlb) torquer circuit; system. (b) torquer system.

The various parametersThe various of parametersthe resistors of sa thetisfying resistors the proportional satisfying the gains proportional obtained gains obtained using the SGA usingwere selected the SGA based were selectedon the equations based on derived the equations above derivedand these above values and are these values are reported in Tablereported 3, for different in Table3 operational, for different voltages. operational voltages.

Table 3. Resistance values for all three-voltage operations.

VALUE RESISTANCE 15 Volt Operation 25 Volt Operation 40 Volt Operation R1 6.8 KΩ 6.8 KΩ 6.8 KΩ R2 32 KΩ 32 KΩ 32 KΩ R3 100 Ω 220 Ω 500 Ω R4 6.8 KΩ 6.8 KΩ 6.8 KΩ The control circuit was simulated using the ORCAD Pspice software and AD844 IC was used for the CCII. ORCAD is a proprietary software belonging to Cadence design systems, widely used for electronic circuit simulation and verification.

5.1. Results for 15 V, 400 mA In nanosatellites the processor works on 3.3 V, so the output current that will flow in the load varies from 0 to 400 mA against the reference input of 0–3.3 V. The output voltage will increase from 0 to 15V. If the input is increased beyond 3.3V, the output current will saturate to 400 mA. The output voltage saturates to 15 V. The simulation and the experi- mental results are shown in the Figure 10. Electronics 2021, 10, 911 9 of 12

Table 3. Resistance values for all three-voltage operations.

Value Resistance 15 Volt Operation 25 Volt Operation 40 Volt Operation R1 6.8 kΩ 6.8 kΩ 6.8 kΩ R2 32 kΩ 32 kΩ 32 kΩ R3 100 Ω 220 Ω 500 Ω R4 6.8 kΩ 6.8 kΩ 6.8 kΩ

The control circuit was simulated using the ORCAD Pspice software and AD844 IC was used for the CCII. ORCAD is a proprietary software belonging to Cadence design systems, widely used for electronic circuit simulation and verification.

5.1. Results for 15 V, 400 mA In nanosatellites the processor works on 3.3 V, so the output current that will flow in the load varies from 0 to 400 mA against the reference input of 0–3.3 V. The output voltage will increase from 0 to 15V. If the input is increased beyond 3.3V, the output current ElectronicsElectronics 2021 2021, ,10 10, ,x x FOR FOR PEER PEER REVIEW REVIEWwill saturate to 400 mA. The output voltage saturates to 15 V. The simulation and1010 of of 13 the 13

experimental results are shown in the Figure 10.

((aa)) ((bb))

FigureFigureFigure 10. 10. 10. The TheThe 15 15 15 V V Voperation operation operation (a) (a) (a Output )Output Output current current current; (b) (b) ( bOutput Output) Output voltage. voltage. voltage.

5.2.5.2.5.2. Results Results Results for for for 25 25 25 V, V, V, 650 650 650 mA mA mA InInIn this this this case, case, case, so so so the the the output output output current current current that that that will will will flow flow flow in in in the the the load load load varies varies varies from from from 0 0 0to to to 650 650 650 mA mA mA againstagainstagainst the the the reference reference reference input input input of of of0–3.3 0–3.3 0–3.3 V. V. V.TheThe The output output output voltage voltage voltage will will will increase increase increase from from from 0 0 to to 025 25 to V. V. 25 If If V. thetheIf the inputinput input is is increasedincreased is increased beyondbeyond beyond 3.33.3 3.3V, V, theV,the the outpoutp outpututut currentcurrent current willwill will saturate saturate saturate toto to650 650 650 mAmA mA and and and thethe the outputoutputoutput voltage voltage voltage saturates saturates saturates to to to 25 25 V. V. The TheThe simula simulationsimulationtion andand the the experimentalexperimental experimental resultsresults resultsare are are shown shown shown in ininFigure Figure Figure 11 11. 11..

(a)(a) (b)(b )

FigureFigureFigure 11. 11. 11. The TheThe 25 25 25 V V Voperation operation operation (a) (a) (a Output )Output Output current current current; (b) (b) ( bOutput Output) Output voltage.. voltage.. voltage.

5.3.5.3. Results Results for for 40 40 V, V, 1 1 A A InIn this this case, case, so so the the output output current current that that will will flow flow in in the the load load varies varies from from 0 0 to to 1 1 A A against against thethe reference reference input input of of 0–3.3 0–3.3 V. V. The The output output volt voltageage will will increase increase from from 0 0 to to 40 40 V. V. If If the the input input isis increased increased beyond beyond 3.3 3.3 V, V, the the output output current current will will saturate saturate to to 1 1 A A and and the the output output voltage voltage saturatessaturates to to 40 40 V. V. The The simulation simulation and and the the ex experimentalperimental results results are are shown shown in in Figure Figure 12. 12.

(a)(a) (b)(b) FigureFigure 12. 12. The The 40 40 V V operation operation (a) (a) Output Output current current (b) (b) Output Output voltage. voltage.

Electronics 2021, 10, x FOR PEER REVIEW 10 of 13

(a) (b) Figure 10. The 15 V operation (a) Output current (b) Output voltage.

5.2. Results for 25 V, 650 mA In this case, so the output current that will flow in the load varies from 0 to 650 mA against the reference input of 0–3.3 V. The output voltage will increase from 0 to 25 V. If the input is increased beyond 3.3 V, the output current will saturate to 650 mA and the output voltage saturates to 25 V. The simulation and the experimental results are shown in Figure 11.

Electronics 2021, 10, 911 (a) (b) 10 of 12 Figure 11. The 25 V operation (a) Output current (b) Output voltage..

5.3.5.3. Results Results for for 40 40 V, V, 1 1 A A InIn this this case, case, so so the the output output current current that that will will flow flow in in the the load load varies varies from from 0 0 to to 1 1 A A against against thethe reference reference input input of of 0–3.3 0–3.3 V. V. The The output output volt voltageage will will increase increase from from 0 0 to to 40 40 V. V. If If the the input input isis increased increased beyond beyond 3.3 3.3 V, V, the the output output current current will will saturate saturate to to 1 1 A A and and the the output output voltage voltage saturatessaturates to to 40 40 V. V. The The simulation simulation and and the the ex experimentalperimental results are shown in Figure 1212..

(a) (b)

FigureFigure 12. 12. TheThe 40 40 V V operation operation (a) (a )Output Output current current; (b) (b Output) Output voltage. voltage.

It can be observed from the above figures that the linearity of the experimental output is good, because of the tolerances on the printed circuit board (PCB). For the 25-volt operation, in transistor Q, small base current (in the range of uA) results in high emitter load current (mA). In practice, to maintain a constant base is difficult. Therefore, even a small base current change (due to fluctuations or noise) can lead to sufficient emitter current, which in turns leads to change in emitter voltage. Due to this reason the experimental output voltage exceeds 25 V and the experimental output current exceeds 650 mA. For the 40-volt operation, the load current requirement is high. Due to this, the transistor Q’s base current is also high and thus, its operation region shifts from the linear region towards the saturation region. This reduces the linear range of operation. For qualitative assessment of the results, the error between the experimental and the simulation results was analyzed. It was observed that the RMS error is in range of 0.01–0.16 A for output current and 0.41–0.6 V for output voltage. The error has mean value of 0.01 A for the output current and has mean values in the range of 0.33–0.48 V for the output voltage. It also has standard deviation of 0.01 A for the output current and standard deviations in the range of 0.24–0.35 V for the output voltage. Furthermore, it was also observed that the RMS error, the mean error, and the standard deviation in the error for 25 and 40 V operations are almost similar.

6. Conclusions Magnetic torquers are widely used for the attitude control of satellites. Kalman filters, PD controllers, etc., were adopted by the researchers for controlling the current flowing through the torquer, using the reference command received from the microprocessor. In this article an active control driver was designed for controlling the torquer’s current. The main findings of this study are as follows: (1) the new active control driver was designed using CCIIs and tested for three operation ranges; (2) the optimal values for the controller parameters were obtained using the SGA algorithm; (3) the experimental results are in good agreement with the simulation results, the RMS errors being in range of 0.01–0.16 A for output current and 0.41–0.6 V for output voltage. The error has mean value of 0.01 A for the output current and has mean values in the range of 0.33–0.48 V for the output voltage. It also has standard deviation of 0.01 A for the output current and standard deviations in the range of 0.24–0.35 V for the output voltage. Electronics 2021, 10, 911 11 of 12

These obtained results indicate that the design presented can be practically employed for space applications. The authors intend to develop artificial intelligence methods for the attitude of the satellite based on the measurements obtained from the magneto-meters, in their future research and compare the results obtained by using the proposed method of attitude control with other methods of attitude control proposed in the literature [33].

Author Contributions: Research methodology, V.K.V., R.K.R., P.P. and B.A.; writing—original draft preparation, V.K.V., R.K.R. and P.P.; supervision, R.K.R., P.T. and N.B.; validation, B.A. and N.B.; writing—review and editing, V.K.V., B.A., N.B. and P.T. All authors have read and agreed to the published version of the manuscript. Funding: This work was partially supported by the International Research Partnerships: Electri- cal Engineering Thai-French Research Center (EE-TFRC) between King Mongkut’s University of Technology North Bangkok and University of Lorraine under Grant KMUTNB−BasicR−64−17. Conflicts of Interest: The authors declare no conflict of interest.

Appendix A GA Parameters: Population size = 10, number of generations = 30 SGA Parameters: Population size = 10, number of generations = 30 FA Parameters: No. of fireflies: 10, α (randomness) = 0.5, β0 (attractiveness) = 1, γ (absorption) = 1, No. of Iteration: 30 PSO Parameters: Number of particles= 10, number of iterations = 30 BA Parameters: Population size = 10, No. of iteration = 30, A (loudness) = 1, α = 1, γ = 0.1

References 1. Duan, G.R.; Yu, H.H. LMIs in Control Systems—Analysis Design and Applications; CRC Press, Taylor & Francis Group: Boca Raton, FL, USA, 2013; pp. 37–389. 2. Wei, L.; Yongliang, X.; Haibo, Y. The effect of satellite movement on two-way time synchronization performance. In Proceedings of the 2012 IEEE International Frequency Control Symposium Proceedings, Baltimore, ML, USA, 21–24 May 2012; Institute of Electrical and Electronics Engineers (IEEE): Piscataway Township, NJ, USA, 2012; Volume 21, pp. 1–3. 3. Sidi, M.J. Spacecraft Dynamics and Control—A Practical Engineering Approach; Cambridge University Press: England, UK, 1997; pp. 64–111. 4. Söken, H.E. An Attitude Filtering and Magnetometer Calibration Approach for Nanosatellites. Int. J. Aeronaut. Space Sci. 2018, 19, 164–171. [CrossRef] 5. Wisniewski, R. Linear Time-Varying Approach to Satellite Attitude Control Using Only Electromagnetic Actuation. J. Guid. Control. Dyn. 2000, 23, 640–647. [CrossRef] 6. Psiaki, M.L. Magnetic Torquer Attitude Control via Asymptotic Periodic Linear Quadratic Regulation. J. Guid. Control. Dyn. 2001, 24, 386–394. [CrossRef] 7. Lovera, M.; De Marchi, E.; Bittanti, S. Periodic attitude control techniques for small satellites with magnetic actuators. IEEE Trans. Control. Syst. Technol. 2002, 10, 90–95. [CrossRef] 8. Challa, M.; Kotaru, S.; Natanson, G. Magnetometer-only attitude and rate estimates during the Earth Radiation Budget Satellite 1987 control anomaly. In Proceedings of the Guidance, Navigation, and Control Conference, Hilton Head, SC, USA, 10–12 August 1997; American Institute of Aeronautics and Astronautics: Reston, VA, USA, 1997; Volume 2, pp. 830–840. 9. Challa, M.; Natanson, G.; Ottenstein, N. Magnetometer-only attitude and rate estimates for spinning spacecraft. In Proceedings of the Astrodynamics Specialist Conference, Denver, CO, USA, 14–17 August 2000; American Institute of Aeronautics and Astronautics: Reston, VA, USA, 2000; pp. 311–321. 10. Crassidis, J.L.; Markley, F.L. Predictive Filtering for Attitude Estimation Without Rate Sensors. J. Guid. Control. Dyn. 1997, 20, 522–527. [CrossRef] 11. Abdelrahman, M.; Park, S.-Y. Integrated attitude determination and control system via magnetic measurements and actuation. Acta Astronaut. 2011, 69, 168–185. [CrossRef] 12. Ovchinnikov, M.; Roldugin, D.; Penkov, V. Three-axis active magnetic attitude control asymptotical study. Acta Astronaut. 2015, 110, 279–286. [CrossRef] 13. Ivanov, D.; Ovchinnikov, M.; Penkov, V.; Roldugin, D.; Doronin, D.; Ovchinnikov, A. Advanced numerical study of the three-axis magnetic attitude control and determination with uncertainties. Acta Astronaut. 2017, 132, 103–110. [CrossRef] 14. Xiang, T.; Meng, T.; Wang, H.; Han, K.; Jin, Z.-H. Design and on-orbit performance of the attitude determination and control system for the ZDPS-1A pico-satellite. Acta Astronaut. 2012, 77, 182–196. [CrossRef] 15. Celani, F. Spacecraft Attitude Stabilization Using Magnetorquers with Separation Between Measurement and Actuation. J. Guid. Control. Dyn. 2016, 39, 2184–2191. [CrossRef] Electronics 2021, 10, 911 12 of 12

16. Carletta, S.; Teofilatto, P. Design and Numerical Validation of an Algorithm for the Detumbling and Angular Rate De-termination of a CubeSat Using Only Three-Axis Magnetometer Data. Int. J. Aerosp. Eng. 2018, 3, 1–12. [CrossRef] 17. Giri, D.K.; Sinha, M. Robust Backstepping Magnetic Attitude Control of Satellite Subject to Unsymmetrical Mass Properties. J. Spacecr. Rocket. 2019, 56, 298–305. [CrossRef] 18. Safari, L.; Minaei, S. A simple low voltage, high output impedance resistor based current mirror with extremely low input and output voltage requirements. In Proceedings of the 2016 39th International Conference on Telecommunications and Signal Processing (TSP), Vienna, Austria, 27–29 June 2016; Institute of Electrical and Electronics Engineers (IEEE): Piscataway Township, NJ, USA, 2016; pp. 254–256. 19. Sedra, A.S. The current conveyor: History and progress. In Proceedings of the 2015 IEEE International Symposium on Circuits and Systems (ISCAS), Lisbon, Portugal, 24–27 May 2015; Institute of Electrical and Electronics Engineers (IEEE): Piscataway Township, NJ, USA, 2015; pp. 1567–1571. 20. Toumazou, C.; Lidgey, F.J.; Haigh, D.G. Analogue IC Design: The Current Mode Approach; Peter Peregrinus Ltd.: London, UK, 1992. 21. Aronhime, P. Transfer-function synthesis using a current conveyor. IEEE Trans. Circuits Syst. 1974, 21, 312–313. [CrossRef] 22. Abdalla, K.K.; Bhaskar, D.R.; Senani, R. Configuration for Realizing a Current-Mode Universal Filter and Dual-Mode Quadrature Single Resistor Controlled Oscillator. IET Circuits Devices Syst. 2012, 6, 159–167. [CrossRef] 23. Senani, R.; Bhaskar, D.R.; Singh, V.K.; Sharma, R.K. Sinusoidal Oscillators and Waveform Generators using Modern Electronic Circuit Building Blocks; Springer: Cham, Switzerland, 2016; pp. 175–209. 24. Gupta, P.; Verma, V.K.; Ranjan, R.K.; Appasani, B.; Priyadarshini, B.; Nath, V. A series expansion method aided design of current mode second generation current conveyor based active control circuit. Microsyst. Technol. 2018, 25, 2323–2330. [CrossRef] 25. Verma, V.K.; Ranjan, R.K.; Gupta, P.; Priyadarshini, B.; Nath, V. A Series Expansion Method Aided Design of CCII Controller for a Tito System. Microsyst. Technol. 2018, 24, 3843–3849. [CrossRef] 26. Gupta, P.; Appasani, B.; Verma, V.K.; Ranjan, R.K. PSO based CCII PID controller for a continuous stirred tank reactor system. In Proceedings of the 2017 IEEE International Conference on Power, Control, Signals and Instrumentation Engineering (ICPCSI), Chennai, India, 21–22 September 2017; Institute of Electrical and Electronics Engineers (IEEE): Piscataway Township, NJ, USA, 2017; pp. 2786–2789. 27. Verma, V.K.; Ranjan, R.K.; Lekshmi, V.; Azad, A.K.; Appasani, B.; Nath, V. A second generation current conveyor based PID controller optimized using a crossover improved genetic algorithm. Microsyst. Technol. 2020, 26, 1449–1454. [CrossRef] 28. Smith, K.; Sedra, A. The current conveyor—A new circuit building block. In Proceedings of the Proceedings of the IEEE; Institute of Electrical and Electronics Engineers (IEEE): Piscataway Township, NJ, USA, 1968; Volume 56, pp. 1368–1369. 29. Wilson, B. Recent developments in current conveyors and current-mode circuits. IEE Proc. G Circuits, Devices Syst. 1990, 137, 63. [CrossRef] 30. Svoboda, J.A.; McGory, L.; Webb, S. Applications of a commercially available current conveyor. Int. J. Electron. 1991, 70, 159–164. [CrossRef] 31. Goldberg, D.E. Genetic Algorithms; Pearson Education: New Delhi, India, 2006; pp. 1–25. 32. Appasani, B.; Gupta, N. A Novel Segmentation Approach in GA and its Applications in Antenna Arrays. Microw. Rev. 2017, 23, 8–14. 33. Smeresky, B.; Rizzo, A.; Sands, T. Optimal Learning and Self-Awareness Versus PDI. Algorithms 2020, 13, 23. [CrossRef]