# Novel Algorithm for Improving Tracking Accuracy of Open-Loop Mobile Sun-Tracking System via Different Timing Control Scheme

Authors: An-Chow Lai; Ming-Cheng Ho; Kok-Keong Chong; Ming-Hui Tan; Boon-Han Lim; Tonni Agustiono Kurniawan
Journal: International Journal of Photoenergy
 (2023)

---

## Abstract

This paper proposes a mobile sun-tracking (MST) system to track the sun on the moving vehicle. We have developed a novel MST algorithm using general sun-tracking formulas associated with simple-moving average linear regression (SMALR) to smoothen sun-tracking activity. Furthermore, two different timing control schemes to activate sun tracking are investigated: time lapse (TL) mode and azimuth actuation (AA) mode. For experimental validation, a prototype of MST has been constructed on a small truck moving at constant speed of 30 km/h for field measurements. For the result, AA mode has average pointing error of 110 mrad for the open-loop tracking design (13% better than that of TL mode), which is still far below the half acceptance angle of compound parabolic concentrator at 659 mrad. Since there is no feedback sensor to be implemented in this prototype, optical encoders and CCD camera can be employed in the future work to further reduce the pointing error of MST system.


---

## Body

## 1. Introduction

Among the leading sources of clean energy, solar energy is the most ubiquitous across wide geographical areas. International Renewable Energy Agency (IRENA) forecasted that the photovoltaic (PV) is expected to continue driving overall renewable energy growth where PV installation can grow almost six-fold over the next ten years, reaching a cumulative capacity of 2840 GW globally by 2030 and rising to 8519 GW by 2050 [1]. While grid-connected PV system is leading the global market, industries are looking ahead to broaden the applications of PV system to the transportation industry particularly in the fields of marine vessels, electric vehicle (EV), and magnetic levitation (maglev) vehicle and spacecraft [2–7]. Since the deck space in electric truck or marine vessel usually is not sufficient to generate electrical energy, a PV-integrated EV or marine vessel only harvest solar energy as a supplement source of energy or battery storage is employed as a hybrid power system. Another reason is that the fixed orientation of PV modules on deck space or roof board is subject to substantial cosine loss attributed to the change of sun position relative to the PV orientation. According to Lim et al., a dual-axis-tracking PV system can produce up to 30% more electrical energy per annum as compared to a fixed-tilt PV system [8]. To increase the energy yield, a sun-tracking mechanism is combined with concentrator photovoltaic system (CPV) to form a high-performance power generation system as the latest multijunction solar cells made by National Renewable Energy Laboratory has achieved power conversion efficiency of 47% [9].Conventional sun-tracking systems are fixed pedestal configuration in the static reference frame, where the pedestal of sun tracker is stationary on a well-defined geographical location and initial orientation as input setting for the sun-tracking formula to determine the instantaneous sun position. In the standard sun-tracking system, the control system drives the solar collector via motors to face the calculated sun position for receiving maximum direct solar irradiance. Generally, the sun-tracking mechanism can be categorized into three major designs of control systems: closed-loop system, open-loop system, and hybrid of both systems [10, 11]. The closed-loop design of sun-tracking system usually employs sensors to provide feedback for the sun position for achieving reasonably good tracking accuracy. The most commonly used closed-loop sensors include CCD (charged-coupled device) camera and LDR (light-dependent resistor) or photodetector, which can keep track the intensity of the sunlight or capturing solar image cast on the sensors and then send the signal to the control system [12, 13]. If the sensor detected any offset from the tracking position, the control system will trigger the driving mechanism to keep the solar collector back on track. The drawback of closed-loop control system is that the feedback sensors cannot operate in the occasion when the sun is shaded by cloud. In the open-loop scheme, mathematical formula is applied to compute the instantaneous sun position based on local clock time, date, and latitude and longitude of the site [11]. The open-loop feedback sensors are fixed to the tracking axis of solar collector to ensure the solar collector is rotated to the computed angles. Since both closed-loop and open-loop schemes have their strengths and weaknesses, the hybrid system has been introduced to include both schemes into one design [14].The requirement of sun-tracking accuracy is very much dependent on the optical design and application of the solar collector [15]. The optical design of solar collector with higher acceptance angle has higher tolerance towards the tracking accuracy in which the high-acceptance angle is always accompanied with low solar concentration ratio. The higher the tracking accuracy, the higher the investment in the tracking mechanism is needed because a more complex feedback mechanism is required to guarantee a better tracking accuracy. Therefore, the solar collector with an appropriate accuracy of sun-tracking system is very much dependent on the application and optical design of solar power system. For a flat plate PV system operating under one sun, the requirement of sun-tracking accuracy is low with an objective of reducing the cosine loss. In 2017, Gutiérrez and Rodrigo proposed two very simple tracking strategies based on a 2-position (morning/afternoon) and 3-position (morning/noon/afternoon) tracker that can reduce the complication while providing a reasonably good annual gain up to 87% in case of the 3-position-tracking manner or equivalent to 60° (1 rad) of tracking accuracy [16]. In 2022, Zaghba et al. found that two axes-tracked PV collects 20.9% more and one axis-tracked PV collects 12.9% more energy as compared to fixed PV system [17]. For the low solar concentration system (a few suns), the accuracy of sun-tracking system is dependent on the acceptance angle of solar concentrator especially compound parabolic concentrator having high-acceptance angle. In 2022, Zhang et al. studied that the azimuth axis-tracking error of less than 1.5° (26 mrad) and the elevation axis-tracking error of less than 6° (104 mrad) can still ensure high-optical efficiency in the case of parabolic trough collector [18]. For a high solar concentrator ratio (more than 100 suns), a required tracking accuracy is high with a range between 1 and 5 milliradian (mrad) to maintain its good performance [19–22]. Based on the aforementioned references, we can conclude that the satisfactory ranges of sun-tracking accuracy depend on the types of solar collector: flat PV is in the range of not more than 1 rad, low solar concentration compound parabolic concentrator 110-660 mrad, medium solar concentration parabolic trough is in the range of 26-104 mrad, high-concentration parabolic dish or Fresnel lens is in the range of 1-5 mrad. The derivation of general formula for on-axis sun-tracking systems was presented by Chong and Wong to solve the three orientation angles of pedestal as three variables in the sun-tracking algorithm [23, 24]. The implementation of general sun-tracking formula in the open-loop sun-tracking system has opened a new opportunity for the mobile sun-tracking (MST) system by making the three orientation angles as time-dependent functions. In 2010, Ankit et al. proposed to integrate the mobile sun-tracking system into photovoltaic module for the unmanned military robotic platform for charging the energy storage devices on board [25]. They applied active-tracking method based on maximum power point tracking using adaptive resonance theory artificial neural network algorithm that requires solar irradiance as input signal. The design is rather complicated and encounter serious problem during cloudy day similar to most of the closed-loop sun-tracking system. In 2011, Mousazadeh et al. optimized solar energy collection from an on-board PV array on a solar assist plug-in hybrid electric tractor using mobile sun-tracking method [26]. They use four light-dependent resistive sensors for the closed-loop sun-tracking system on a mobile structure and the gain was about 30% as compared to fixed mode PV.Up-to-date, there is no any comprehensive study yet on the mobile sun-tracking system, which is designed to track the sun on the commercial vehicle moving at reasonable speed [3, 10]. In general, mobile sun-tracking system is an important technology for future mobile solar power system, which includes floating platform in the sea, train, vehicle, marine vessel, satellite, and spacecraft. Different from stationary sun-tracking system, the mobile sun-tracking system have more difficulties to be implemented in practice: (1) more parameters in the sun-tracking formula will be changing as the mobile platform moves during the operation; (2) significant noises will be picked up by the sensors (digital compass/GPS) to locate current orientation of solar collector; and (3) continuous change in the heading direction and wobbling of mobile platform causing frequent tracking activities. For the novelty of our work, we have developed a novel mobile sun-tracking mechanism that is capable of continuous tracking of the sun at acceptable precision to overcome the aforementioned challenges and hence to improve the efficiency of the mobile solar power system. To summarize the contribution of this work, we have proposed several important features for enhancing the existing sun-tracking algorithm to accommodate the new requirements in the mobile solar power system, including an integration of noise-filtering algorithm, and optimizing the frequency of activation sun-tracking activities. For the first contribution, three different noise-filtering algorithms have been proposed for tackling high noises in the digital compass and GPS and hence reducing sun-tracking error, namely, simple linear regression (SLR), simple moving average (SMA), and simple-moving average linear regression (SMALR). For the second contribution, two different timing control schemes are introduced for optimizing the tracking accuracy, which are time lapse (TL) mode and azimuth actuation (AA) mode. The scopes of this study embrace the implementation of new MST algorithm, hardware design, and real-time performance analysis.In this paper, we present the novel MST system in the following order: Introduction (literature review, research gaps, novelty, and contribution of this work), Methodology (flow chart of algorithm and hardware and software design), Results and Discussion (theoretical and experimental results), and Conclusion. The generic algorithm of MST system consists of two major parts. The first part is to monitor the dynamic change of geographical coordinates and heading directions of the mobile solar power system. The second part is to determine the next instantaneous azimuth and elevation angles every interval where the solar collector should be rotated. Finally, the proposed MST system has been validated via field testing of the CPV system on a commercial vehicle.


## 2. Methodology

As the case study, a prototype of mobile sun-tracking (MST) system that adopts azimuth-elevation-tracking mechanism has been designed and constructed to test its performance on the moving vehicle. Figure1 illustrates the schematic diagram on the architectural overview of the prototype MST system where the MST prototype consists of both hardware and software components: (1) for the hardware component, it contains an assembly of dielectric-filled crossed compound parabolic concentrator (CCPC) and concentrator photovoltaic (CPV) module, cooling block, global positioning system (GPS), digital compass, and two stepper motors coupled to rotational axes via gearboxes; (2) for the software component, it has a control algorithm, which has been designed and operated via Raspberry Pi with embedded system capable of performing data acquisition and data processing and computing elevation and azimuth angles using the general sun-tracking formula. Furthermore, Figure 1 also shows the flow of activities within a single software loop to track the sun and how Raspberry Pi can be connected to all the hardware components.Figure 1
The architectural overview of prototype mobile sun-tracking (MST) system consisting of hardware and software components.The optical and electrical performances of the assembly of CCPC-CPV module have been analyzed in details by Lee et al. in which the actual solar concentration ratio is 4.5 suns with the half acceptance angle of CCPC of 37.77° or 659 mrad [27]. We design the assembly of CCPC-CPV module to have a reasonable high-acceptance angle or high tolerance towards the tracking error because it is not practical for MST system to achieve high-tracking accuracy as the control system needs time to respond towards the sudden directional change of moving vehicle (also known as mobile platform).


### 2.1. General Sun-Tracking Formula

According to the general formula of on-axis sun-tracking system as proposed by Chong and Wong, the accuracy of sun-tracking system is highly reliant on the input parameters to the computational algorithm: latitude angle (Φ), hour angle (ω), declination angle (δ), and the three orientation angles of sun-tracker, i.e., φ, λ, and ζ [23, 24]. Among these values, local latitude and longitude of the sun-tracking system can be determined accurately with the latest GPS technology. Next, ω and δ are dependent on both local time and date in which these parameters can be obtained accurately from the precise clock and calendar synchronized with the internet timeserver. For a stationary sun-tracking system, the three orientation angles are determined by the conditions of on-site installation of the solar collector embracing the misalignment of tracking axes and the defect in mechanical fabrication. For the MST system, the change of three orientation angles owing to the direction change in mobile platform can be detected by using digital compass or gyro sensor.The collector-center frame of coordinateS′ can be interrelated with the earth-center frame based coordinate S through the process of four successive coordinate transformations. It will be first transformed from earth-center frame to earth-surface frame through transformation matrix Φ, then from earth-surface frame to collector-center frame through three subsequent coordinate transformation matrices that are ϕ, λ, and ζ. In mathematical expression, S′ can be obtained through multiplication of four successive rotational transformation matrices with S as described in
(1a)S′=ζλφΦS,(1b)sinαcosαsinβcosαcosβ=cosζ0sinζ010−sinζ0cosζ×cosλ−sinλ0sinλcosλ0001×1000cosφ−sinφ0sinφcosφ×cosΦ0sinΦ010−sinΦ0cosΦ×cosδcosω−cosδsinωsinδ,(2a)α=arcsincosδcosωcosζcosλcosΦ−cosζsinλsinφsinΦ−sinζcosφsinΦ−cosδsinωsinζsinφ−cosζsinλcosφ+sinδcosζcosλsinΦ+cosζsinλsinφcosΦ+sinζcosφcosΦ,(2b)sinβ=cosδcosωsinλcosΦ+cosλsinφsinΦ−cosδsinωcosλcosφ+sinδsinλsinΦ−cosλsinφcosΦcosα,(2c)cosβ=cosδcosω−sinζcosλcosΦ+sinζsinλsinφsinΦ−cosζcosφsinΦ−cosδsinωsinζsinλcosφ+cosζsinφ+sinδ−sinζcosλsinΦ−sinζsinλsinφcosΦ+cosζcosφcosΦcosα.In the case ofcosβ≥0,
(2d)β=arcsincosδcosωsinλcosΦ+cosλsinφsinΦ−cosδsinωcosλcosφ+sinδsinλsinΦ−cosλsinφcosΦcosα.In the case ofcosβ<0,
(2e)β=π−arcsincosδcosωsinλcosΦ+cosλsinφsinΦ−cosδsinωcosλcosφ+sinδsinλsinΦ−cosλsinφcosΦcosα.From Equation (1b), we can expand the formula into Equations (2a)–(2e) and the detailed derivation was explained in our previous paper [23, 24]. Hence, the mathematical formulas of general sun-tracking are briefly presented in this paper for completeness, where ϕ angle is the yaw angle or the horizontal-heading direction (horizontal direction change on the zenith axis Z); λ is the roll angle or side-tilted-driving direction (the rotational angle change on the reference axis R); ζ is the pitch angle or uphill- and downhill-driving direction (the tilting angle change on the horizontal axis H); α is elevation-tracking angle; β is azimuth-tracking angle; ω is hour angle; δ is declination angle; and Φ is local latitude at which the solar collector is located.Since the solar tracker on the moving vehicle travels from one location to another location in the case of MST system, the local latitude and longitude are no longer constants but instead, it is in the functions of time, and so are the three orientation angles of the sun tracker. The variation of these parameters can be monitored via GPS and digital compass by capturing the change of coordinates and moving directions of the vehicle, respectively. In practice, the readings of the digital compass and accelerometers are very sensitive to noise, and thus a real-time noise filtering that runs on an embedded microprocessor is necessary to improve the accuracy of these sensors. The sources of noises embrace electromagnetic interference, short duration change (e.g., the vehicle passing the speed bump), and mechanical vibration. Figure2 illustrates the mathematical modelling to represent the changes of the three orientation angles in three orthogonal axes of vehicle, which is also known as yaw-pitch-roll (ϕ, ζ, and λ) [23].Figure 2
Three orientation angles of the mobile sun-tracking system on the moving vehicle, which subject to the change with time as the vehicle changes direction or passes speed bump.


### 2.2. Filtering Algorithms

In this case study, the prototype MST system employs GPS sensor and digital compass to detect the changes in instantaneous position and orientation angle, respectively. Even though the speed of vehicle can influence the accuracy of GPS sensor, it is negligible. The reason is that every kilometer change for latitude and longitude coordination can only cause ±0.2% and ±0.1%, respectively, in the GPS readings and hence, the noise filtering is not required for GPS sensor. Despite GPS sensor capable of capturing the current position of MST system, it cannot provide the orientation angles of the mobile platform that are needed in the calculation of the sun trajectory angles, i.e., elevation and azimuth angles. In other words, digital compass plays a crucial role for sensing instant change of orientation angles of the MST system from time to time in order to calculate the latest sun trajectory angles.In practice, the reading from the digital compass can be disturbed heavily by noise and a real-time filtering run on an embedded microprocessor is necessary. The output signals from these sensors should be smoothened using real-time filtering algorithms prior to being fed into the computational algorithm for sun trajectory angles. The computational algorithm is designed to calculate the sun trajectory angles before the solar collectors are triggered to track the sun. An appropriate filtering algorithm can avoid unnecessary actuations of the motors during the operation of sun tracking because short-duration spikes can easily be greater than the triggering thresholds set by the control algorithms.Ideally, the inputs to the filtering algorithm are the three orientation angles:ϕt, λt, and ζt generated from the digital compass. For the sake of convenience, we use θt to represent any of these three orientation angles in the following text. Nevertheless, θt becomes a discontinuous function in practice when the mobile platform is heading to the direction with angle of 0° or 360°. However, as the actual reading from the digital compass, which is affected by noise fluctuates between (360°-ε) and (0°+ε) instead of a constant value 0°, where ε is the random error of digital compass. In this case, a simple-moving average-filtering algorithm cannot function properly as the digital compass returns a value around 180° instead of 0°. As Equation (2) taking in either sine or cosine functions of θt that are continuous functions in nature as the inputs to the computational algorithm, we found that it is more appropriate to apply the filtering algorithms to the outcomes of sinusoidal functions instead of the raw value of θt.For instance, the angle ofϕt with 0°≤ϕt<360° denotes the angle of heading direction for a mobile platform with respect to the north at time t. The time function ϕt as well as the time functions λt and ζt can be measured by the digital compass in real time. In practical implementation, the output signals from digital compass show a lot of unexpected spikes or noises albeit the whole system comes to a standstill. There is a myriad of filtering algorithm applicable for removing the noises from the digital compass. As both power consumption and fast response time of the MST are concerned, both complicated filtering algorithms and frequent actuations are not favourable despite of improved accuracy and hence effective solar energy harvesting. Thus, only simple algorithms are suitable for the application of MST as complex algorithms can usually lead to a slower response time and higher computational power.Two different algorithms are considered in this study, which are simple moving average (SMA) and simple linear regression (SLR). SMA is a function to compute the average of the lastm values of variable θ with respect to the data index x. SLR is the least square estimator of a linear regression model to model the relationship between a scalar-dependent variable θ and one explanatory variable (which is x in our case) by fitting a straight line through the set of last m values of variable θ with respect to the data index x. In both SMA and SLR, m represents the moving window size that is tunable. The formulas of input parameters for both SMA and SLR are expressed in the following:SMA:(3)θ^x,SMA=θx¯=1m∑i=0m−1θx−i.SLR:(4)βx=rxθsysx;αx=θx¯−βxx¯;∋θ^x,SLR=αx+βxx,where
(5)Sx=1m∑i=0m−1x−i−x¯2andx¯=1m∑i=0m−1x−i,Sθ=1m∑i=0m−1θx−i−θx¯2,rxθ=∑i=0m−1x−i−x¯θx−i−θx¯n−1SxSθ,where θ^x,SMA is the estimated θ that best fits for the data point at x for SMA; θ^x,SLR is the estimated θ that best fits for the data point at x for SLR; rxy is the sample correlation coefficient between x and θ; Sx is the standard deviation of x; Sθ= the standard deviation of θ; θx¯ is the mean value of the last m data values of θ w.r.t. index x; and x¯ is the mean value of the last m data indices.In this study, we use linear regression method to compute the estimated value,θ^x,SLR, which fits best within the outcomes of sinusoidal functions of last m angles with respect to data index x. SMA is capable of smoothening out the spikes, but it is usually slower in approximating the original data line as compared to SLR. Unlike SMA, the estimated values by SLR often are exaggerated with respect to the actual values when there are abrupt changes in the original data, i.e., predicting a value overshooting the original data line and sometimes even out of the range of [-1, +1] that is not valid for sinusoidal functions. Studies found that a compound-filtering function F=θ^x,SMA+θ^x,SLR/2, which we call SMALR, is capable of producing a better effect by taking the average of the estimated values by SMA and SLR at the same data index x, i.e., faster approximation and smaller overreaction at the same time. In actual implementation, F is capped between -1 and +1 if the calculation produces a value which is outside the range of [-1, +1]. Similar filtering approach is applied to both λt and ζt in our implementation.


### 2.3. Microcontroller and Software System

Autodetection and mobility are the two important features in the design of MST system. The choice of the microcontroller must not only be compact in size but also fast enough to perform the required computation as well as to control the movement of the solar collector. Among various types of microcontrollers, Raspberry Pi is chosen in our prototype as it fulfills the aforementioned conditions and equipped with several input/output pins that can connect to different types of sensors at the same time through General Purpose Input/Output (GPIO) ports, SPI ports, and USB ports.In this work, the GPS sensor and digital compass used in the prototype are Garmin GLO™ model and OceanServer OS5000-S 3-Axis Digital Compass, respectively. The OceanServer digital compass is connected to Raspberry Pi via USB port, which is capable of sending 30 readings per second to Raspberry Pi at a baud rate of 9600. Meanwhile, the Garmin GPS sensor connected via Bluetooth to Raspberry Pi is capable of sending the current location of prototype, which consists of both local latitude and longitude readings from time to time. All the connected peripherals (i.e., sensors and motor drivers that are connected externally to the Raspberry Pi) are programmed using Python programming language with its built-in libraries. Since Raspberry Pi does not have a built-in clock, a RTC (real-time clock) is installed externally to feed the local clock time and date for computational algorithm of sun-trajectory angles. After computing the azimuth and elevation angles using the general sun-tracking formula, the control software converts these angles into pulses and directional signals to actuate the stepper motors. CCD (charged-coupled device) camera is fixed inside the mobile sun tracker to capture the solar images for the purpose of sun-tracking accuracy analysis.


### 2.4. Assembly of CCPC-CPV Module

In the prototype MST system, an assembly of CCPC-CPV module is applied as solar collector to harness solar energy. As shown in Figure3, the dielectric-filled crossed compound parabolic concentrator (CCPC) lens is attached to a CPV cell with a dimension of 1×1cm2 at the exit aperture of the CCPC lens. CCPC is a type of nonimaging concentrators capable of concentrating the incident sunrays with wide acceptance angle from a large area of entrance aperture to a smaller area of exit aperture. The detailed study of an assembly of CCPC lens and CPV module was published in our previous work [27, 28]. For the half acceptance angle of CCPC of 37.77°, the CCPC lens can tolerate any pointing error of less than 37.77° or 659 mrad occurred to the MST via total internal reflection in which the incident sunlight can still be fully received by CPV cell without any optical loss. The CCPC lens is designed to have the entrance aperture to cover the full dimension of CPV module embracing CPV cell, bypass diode, ribbon bond connection, and DBC substrate while exit aperture size is matched well with the active area of the multijunction solar cell. The major advantages of CCPC lens against CCPC reflector are the refraction effect at the interface of air-glass material increasing the acceptance angle, and there is no reflection loss in the lens due to the total internal reflection. Although the control algorithm intends to keep the sun on track via continuously adjustment, there is a short duration of delay for the MST system to catch up the accurate tracking position when the vehicle makes a swift change in its moving direction. Such temporary off-tracking can lead to sunlight concentrating on components beside the solar cell and cause serious burned out.Figure 3
Optical configuration of the assembly of crossed compound parabolic concentrator and concentrator photovoltaic (CCPC-CPV) module.


### 2.5. System Construction

There are a few constraints needed to be fulfilled to incorporate the sensors into the system. For example, the accuracy of digital compass depends on how much of the changes of the Earth’s magnetic field it can detect and hence, it is very sensitive to the surroundings conditions that can influence the Earth’s magnetic field. Since our prototype is an open-loop two-axis solar tracker without any feedback system via optical encoders, there are two stepper motors installed to respond to the azimuth and elevation adjustments. One motor is installed on one side of the holder along the elevation axis of the solar concentrator for maneuvering the elevation angle while another motor is connected to the round-spinning plate for maneuvering the azimuth angle. Both motors are controlled by Raspberry Pi via motor drivers in a sequence of one after another. Figure4 gives the schematic diagram on the overview of hardware setup of the prototype MST system.Figure 4
Schematic diagram of the prototype mobile sun-tracking (MST) system.Underneath the solar concentrator mount is a large, enclosed structure with a dimension of60cmheight×60cmwidth×76cmlength to serve as a pedestal for structural support as well as to provide an enclosed space for hosting the control system of the MST system. The main components of control system include Raspberry Pi, digital compass, GPS sensor, motor drivers, the stepper motors, and the batteries to support the Raspberry Pi. The enclosed structure is separated into two parts by an acrylic board: the upper part of the acrylic board locates azimuth motor while the lower part of the acrylic board is the controlling panel to keep the main control hardware of the prototype. The enclosed structure is made of steel frame except that the bottom plate of the enclosed structure is made of acrylic board. As indicated in the specification of the digital compass, it must be located at least 25.4 cm away from any metal or material that can influence the surrounding magnetic field. To isolate the digital compass from any metallic material, the digital compass is placed straight at the bottom plate (acrylic board) of enclosure structure so that all the metal structure is more than 25.4 cm away from the digital compass.For CPV cell, a cooling system is needed to ensure good heat dissipation. The rise of operating temperature in the solar cell will reduce its performance. A heat sink is attached at the bottom of the solar cell, preventing it from overheated under highly concentrated sunlight. To reduce the overall temperature inside the solar concentrator frame, we increase the ventilation by attaching another two fans at the bottom of the top box portion with opposite-facing directions. One fan serves as “fan-in” while the other one serves as “fan-out” to create an internal air circulation which rapidly brings the heat created by the concentrated sunlight outside the box.The motor driver serves as the interface between Raspberry Pi and the stepper motor to keep the motor actuation simple and straightforward where the Raspberry Pi just has to send the required pulses to the motor driver to activate the actuation. Stepper motor is chosen in our implementation and the commands that motor drivers receive are the number of steps and the direction of the actuation. There are two pulse modes for motor drivers: i.e., one-pulse mode and two-pulse mode in the hardware configuration. For one-pulse mode, motor driver receives only one pulse, which is the number of steps to actuate and the actuation is fixed either clockwise or anticlockwise throughout the entire usage. For two-pulse mode, motor driver receives two pulses, one is the number of steps to be actuated and another is the direction of this current actuation so that motor be actuated in both directions, i.e., clockwise and anticlockwise.In our system, the two-pulsed mode is adopted because the actuation angles can be more than 180° if we use one-pulse mode. For example, the motor needs to actuate from 0° to 290° in clockwise direction for one-pulse mode that is very time consuming and too much of time lagging, while two-pulse mode can allow the actuation to go in anticlockwise direction from 360° to 290° with angular movement of 70° only. The improvement might not necessary in stationary sun tracker due to the sun position changing slowly in the sky. However, this improvement is very critical for MST because the change of mobile platform can be drastic. For example, updates of azimuth and elevation angles can be abrupt especially when the mobile platform turns at the corner of a road and slow actuations will cause the sun-tracking system falling far behind the exact sun trajectory.Motor driver only takes step count, so the angle needs to be converted to steps before it is sent to motor driver by Raspberry Pi. Depending on the calculated rotational angles, the pulse direction that the microcontroller sends will be clockwise if the angle is less than 180° compared to the previous angle. Contrarily, the pulse direction that the microcontroller sends will be anticlockwise if the angle is more than 180°. The resolution of stepper motor used in our prototype is 0.0144° per step. The angle of less than 0.0144° or single-step size will not be actuated by the control system as the motor driver can only take integer number of pulses. To keep the solar concentrator closest to its tracking position, the remainders that are not included in the current and previous actuations will be accumulated into one or more steps in the next actuation.


### 2.6. Actuation Modes

In the case of stationary sun-tracking system, the routine sun-tracking process is a single direction from morning to evening, making continuous tracking and actuation activities simple. For MST system, even when the host vehicle moves on a straight line, the road conditions are not predictable that may cause the MST being over responsive towards unnecessary events such as changing of lanes and passing speed bump or bumpy roads. Even this short event is a temporary, it maybe overreacted by the control system and trigger the stepper motors of the sun tracker, which leads to unnecessary waste of energy. Moreover, the road condition sometimes may induce a high-frequency short-pulse signal in digital compass that fluctuates faster than the MST can respond immediately, and the delay response of MST can worsen the tracking accuracy, which reduce the effectiveness in solar energy harvesting. As such, it is important to understand that the MST system is designed to track the sun effectively but not to overrespond to the short event. To devise the sun-tracking operation more effectively, two different timing control schemes are investigated in our study: time lapse (TL) mode and azimuth actuation (AA) mode.In TL mode, the calculations of azimuth and elevation angles are performed periodically with a cyclic time oftL and the pulses are subsequently sent to the motor driver at the end of the cycle by Raspberry Pi. In AA mode, Raspberry Pi only sends the pulses to the motor driver when the difference of the latest calculated azimuth angle and current azimuth angle is more than the threshold angle, αTH. Both parameters tL and αTH are variables and can be reconfigured when the system is booted. Figure 5 shows the differences between the two algorithms where TL mode is a simple time-based loop to detect time elapse since last actuation, whereas AA mode is a condition-based loop to check if αTH is fulfilled for next actuation.Figure 5
Flow charts for time lapse (TL) and azimuth actuation (AA) modes.
(a)
Time Lapse (TL) mode(b)
Azimuth Actuation (AA) mode


## 2.1. General Sun-Tracking Formula

According to the general formula of on-axis sun-tracking system as proposed by Chong and Wong, the accuracy of sun-tracking system is highly reliant on the input parameters to the computational algorithm: latitude angle (Φ), hour angle (ω), declination angle (δ), and the three orientation angles of sun-tracker, i.e., φ, λ, and ζ [23, 24]. Among these values, local latitude and longitude of the sun-tracking system can be determined accurately with the latest GPS technology. Next, ω and δ are dependent on both local time and date in which these parameters can be obtained accurately from the precise clock and calendar synchronized with the internet timeserver. For a stationary sun-tracking system, the three orientation angles are determined by the conditions of on-site installation of the solar collector embracing the misalignment of tracking axes and the defect in mechanical fabrication. For the MST system, the change of three orientation angles owing to the direction change in mobile platform can be detected by using digital compass or gyro sensor.The collector-center frame of coordinateS′ can be interrelated with the earth-center frame based coordinate S through the process of four successive coordinate transformations. It will be first transformed from earth-center frame to earth-surface frame through transformation matrix Φ, then from earth-surface frame to collector-center frame through three subsequent coordinate transformation matrices that are ϕ, λ, and ζ. In mathematical expression, S′ can be obtained through multiplication of four successive rotational transformation matrices with S as described in
(1a)S′=ζλφΦS,(1b)sinαcosαsinβcosαcosβ=cosζ0sinζ010−sinζ0cosζ×cosλ−sinλ0sinλcosλ0001×1000cosφ−sinφ0sinφcosφ×cosΦ0sinΦ010−sinΦ0cosΦ×cosδcosω−cosδsinωsinδ,(2a)α=arcsincosδcosωcosζcosλcosΦ−cosζsinλsinφsinΦ−sinζcosφsinΦ−cosδsinωsinζsinφ−cosζsinλcosφ+sinδcosζcosλsinΦ+cosζsinλsinφcosΦ+sinζcosφcosΦ,(2b)sinβ=cosδcosωsinλcosΦ+cosλsinφsinΦ−cosδsinωcosλcosφ+sinδsinλsinΦ−cosλsinφcosΦcosα,(2c)cosβ=cosδcosω−sinζcosλcosΦ+sinζsinλsinφsinΦ−cosζcosφsinΦ−cosδsinωsinζsinλcosφ+cosζsinφ+sinδ−sinζcosλsinΦ−sinζsinλsinφcosΦ+cosζcosφcosΦcosα.In the case ofcosβ≥0,
(2d)β=arcsincosδcosωsinλcosΦ+cosλsinφsinΦ−cosδsinωcosλcosφ+sinδsinλsinΦ−cosλsinφcosΦcosα.In the case ofcosβ<0,
(2e)β=π−arcsincosδcosωsinλcosΦ+cosλsinφsinΦ−cosδsinωcosλcosφ+sinδsinλsinΦ−cosλsinφcosΦcosα.From Equation (1b), we can expand the formula into Equations (2a)–(2e) and the detailed derivation was explained in our previous paper [23, 24]. Hence, the mathematical formulas of general sun-tracking are briefly presented in this paper for completeness, where ϕ angle is the yaw angle or the horizontal-heading direction (horizontal direction change on the zenith axis Z); λ is the roll angle or side-tilted-driving direction (the rotational angle change on the reference axis R); ζ is the pitch angle or uphill- and downhill-driving direction (the tilting angle change on the horizontal axis H); α is elevation-tracking angle; β is azimuth-tracking angle; ω is hour angle; δ is declination angle; and Φ is local latitude at which the solar collector is located.Since the solar tracker on the moving vehicle travels from one location to another location in the case of MST system, the local latitude and longitude are no longer constants but instead, it is in the functions of time, and so are the three orientation angles of the sun tracker. The variation of these parameters can be monitored via GPS and digital compass by capturing the change of coordinates and moving directions of the vehicle, respectively. In practice, the readings of the digital compass and accelerometers are very sensitive to noise, and thus a real-time noise filtering that runs on an embedded microprocessor is necessary to improve the accuracy of these sensors. The sources of noises embrace electromagnetic interference, short duration change (e.g., the vehicle passing the speed bump), and mechanical vibration. Figure2 illustrates the mathematical modelling to represent the changes of the three orientation angles in three orthogonal axes of vehicle, which is also known as yaw-pitch-roll (ϕ, ζ, and λ) [23].Figure 2
Three orientation angles of the mobile sun-tracking system on the moving vehicle, which subject to the change with time as the vehicle changes direction or passes speed bump.


## 2.2. Filtering Algorithms

In this case study, the prototype MST system employs GPS sensor and digital compass to detect the changes in instantaneous position and orientation angle, respectively. Even though the speed of vehicle can influence the accuracy of GPS sensor, it is negligible. The reason is that every kilometer change for latitude and longitude coordination can only cause ±0.2% and ±0.1%, respectively, in the GPS readings and hence, the noise filtering is not required for GPS sensor. Despite GPS sensor capable of capturing the current position of MST system, it cannot provide the orientation angles of the mobile platform that are needed in the calculation of the sun trajectory angles, i.e., elevation and azimuth angles. In other words, digital compass plays a crucial role for sensing instant change of orientation angles of the MST system from time to time in order to calculate the latest sun trajectory angles.In practice, the reading from the digital compass can be disturbed heavily by noise and a real-time filtering run on an embedded microprocessor is necessary. The output signals from these sensors should be smoothened using real-time filtering algorithms prior to being fed into the computational algorithm for sun trajectory angles. The computational algorithm is designed to calculate the sun trajectory angles before the solar collectors are triggered to track the sun. An appropriate filtering algorithm can avoid unnecessary actuations of the motors during the operation of sun tracking because short-duration spikes can easily be greater than the triggering thresholds set by the control algorithms.Ideally, the inputs to the filtering algorithm are the three orientation angles:ϕt, λt, and ζt generated from the digital compass. For the sake of convenience, we use θt to represent any of these three orientation angles in the following text. Nevertheless, θt becomes a discontinuous function in practice when the mobile platform is heading to the direction with angle of 0° or 360°. However, as the actual reading from the digital compass, which is affected by noise fluctuates between (360°-ε) and (0°+ε) instead of a constant value 0°, where ε is the random error of digital compass. In this case, a simple-moving average-filtering algorithm cannot function properly as the digital compass returns a value around 180° instead of 0°. As Equation (2) taking in either sine or cosine functions of θt that are continuous functions in nature as the inputs to the computational algorithm, we found that it is more appropriate to apply the filtering algorithms to the outcomes of sinusoidal functions instead of the raw value of θt.For instance, the angle ofϕt with 0°≤ϕt<360° denotes the angle of heading direction for a mobile platform with respect to the north at time t. The time function ϕt as well as the time functions λt and ζt can be measured by the digital compass in real time. In practical implementation, the output signals from digital compass show a lot of unexpected spikes or noises albeit the whole system comes to a standstill. There is a myriad of filtering algorithm applicable for removing the noises from the digital compass. As both power consumption and fast response time of the MST are concerned, both complicated filtering algorithms and frequent actuations are not favourable despite of improved accuracy and hence effective solar energy harvesting. Thus, only simple algorithms are suitable for the application of MST as complex algorithms can usually lead to a slower response time and higher computational power.Two different algorithms are considered in this study, which are simple moving average (SMA) and simple linear regression (SLR). SMA is a function to compute the average of the lastm values of variable θ with respect to the data index x. SLR is the least square estimator of a linear regression model to model the relationship between a scalar-dependent variable θ and one explanatory variable (which is x in our case) by fitting a straight line through the set of last m values of variable θ with respect to the data index x. In both SMA and SLR, m represents the moving window size that is tunable. The formulas of input parameters for both SMA and SLR are expressed in the following:SMA:(3)θ^x,SMA=θx¯=1m∑i=0m−1θx−i.SLR:(4)βx=rxθsysx;αx=θx¯−βxx¯;∋θ^x,SLR=αx+βxx,where
(5)Sx=1m∑i=0m−1x−i−x¯2andx¯=1m∑i=0m−1x−i,Sθ=1m∑i=0m−1θx−i−θx¯2,rxθ=∑i=0m−1x−i−x¯θx−i−θx¯n−1SxSθ,where θ^x,SMA is the estimated θ that best fits for the data point at x for SMA; θ^x,SLR is the estimated θ that best fits for the data point at x for SLR; rxy is the sample correlation coefficient between x and θ; Sx is the standard deviation of x; Sθ= the standard deviation of θ; θx¯ is the mean value of the last m data values of θ w.r.t. index x; and x¯ is the mean value of the last m data indices.In this study, we use linear regression method to compute the estimated value,θ^x,SLR, which fits best within the outcomes of sinusoidal functions of last m angles with respect to data index x. SMA is capable of smoothening out the spikes, but it is usually slower in approximating the original data line as compared to SLR. Unlike SMA, the estimated values by SLR often are exaggerated with respect to the actual values when there are abrupt changes in the original data, i.e., predicting a value overshooting the original data line and sometimes even out of the range of [-1, +1] that is not valid for sinusoidal functions. Studies found that a compound-filtering function F=θ^x,SMA+θ^x,SLR/2, which we call SMALR, is capable of producing a better effect by taking the average of the estimated values by SMA and SLR at the same data index x, i.e., faster approximation and smaller overreaction at the same time. In actual implementation, F is capped between -1 and +1 if the calculation produces a value which is outside the range of [-1, +1]. Similar filtering approach is applied to both λt and ζt in our implementation.


## 2.3. Microcontroller and Software System

Autodetection and mobility are the two important features in the design of MST system. The choice of the microcontroller must not only be compact in size but also fast enough to perform the required computation as well as to control the movement of the solar collector. Among various types of microcontrollers, Raspberry Pi is chosen in our prototype as it fulfills the aforementioned conditions and equipped with several input/output pins that can connect to different types of sensors at the same time through General Purpose Input/Output (GPIO) ports, SPI ports, and USB ports.In this work, the GPS sensor and digital compass used in the prototype are Garmin GLO™ model and OceanServer OS5000-S 3-Axis Digital Compass, respectively. The OceanServer digital compass is connected to Raspberry Pi via USB port, which is capable of sending 30 readings per second to Raspberry Pi at a baud rate of 9600. Meanwhile, the Garmin GPS sensor connected via Bluetooth to Raspberry Pi is capable of sending the current location of prototype, which consists of both local latitude and longitude readings from time to time. All the connected peripherals (i.e., sensors and motor drivers that are connected externally to the Raspberry Pi) are programmed using Python programming language with its built-in libraries. Since Raspberry Pi does not have a built-in clock, a RTC (real-time clock) is installed externally to feed the local clock time and date for computational algorithm of sun-trajectory angles. After computing the azimuth and elevation angles using the general sun-tracking formula, the control software converts these angles into pulses and directional signals to actuate the stepper motors. CCD (charged-coupled device) camera is fixed inside the mobile sun tracker to capture the solar images for the purpose of sun-tracking accuracy analysis.


## 2.4. Assembly of CCPC-CPV Module

In the prototype MST system, an assembly of CCPC-CPV module is applied as solar collector to harness solar energy. As shown in Figure3, the dielectric-filled crossed compound parabolic concentrator (CCPC) lens is attached to a CPV cell with a dimension of 1×1cm2 at the exit aperture of the CCPC lens. CCPC is a type of nonimaging concentrators capable of concentrating the incident sunrays with wide acceptance angle from a large area of entrance aperture to a smaller area of exit aperture. The detailed study of an assembly of CCPC lens and CPV module was published in our previous work [27, 28]. For the half acceptance angle of CCPC of 37.77°, the CCPC lens can tolerate any pointing error of less than 37.77° or 659 mrad occurred to the MST via total internal reflection in which the incident sunlight can still be fully received by CPV cell without any optical loss. The CCPC lens is designed to have the entrance aperture to cover the full dimension of CPV module embracing CPV cell, bypass diode, ribbon bond connection, and DBC substrate while exit aperture size is matched well with the active area of the multijunction solar cell. The major advantages of CCPC lens against CCPC reflector are the refraction effect at the interface of air-glass material increasing the acceptance angle, and there is no reflection loss in the lens due to the total internal reflection. Although the control algorithm intends to keep the sun on track via continuously adjustment, there is a short duration of delay for the MST system to catch up the accurate tracking position when the vehicle makes a swift change in its moving direction. Such temporary off-tracking can lead to sunlight concentrating on components beside the solar cell and cause serious burned out.Figure 3
Optical configuration of the assembly of crossed compound parabolic concentrator and concentrator photovoltaic (CCPC-CPV) module.


## 2.5. System Construction

There are a few constraints needed to be fulfilled to incorporate the sensors into the system. For example, the accuracy of digital compass depends on how much of the changes of the Earth’s magnetic field it can detect and hence, it is very sensitive to the surroundings conditions that can influence the Earth’s magnetic field. Since our prototype is an open-loop two-axis solar tracker without any feedback system via optical encoders, there are two stepper motors installed to respond to the azimuth and elevation adjustments. One motor is installed on one side of the holder along the elevation axis of the solar concentrator for maneuvering the elevation angle while another motor is connected to the round-spinning plate for maneuvering the azimuth angle. Both motors are controlled by Raspberry Pi via motor drivers in a sequence of one after another. Figure4 gives the schematic diagram on the overview of hardware setup of the prototype MST system.Figure 4
Schematic diagram of the prototype mobile sun-tracking (MST) system.Underneath the solar concentrator mount is a large, enclosed structure with a dimension of60cmheight×60cmwidth×76cmlength to serve as a pedestal for structural support as well as to provide an enclosed space for hosting the control system of the MST system. The main components of control system include Raspberry Pi, digital compass, GPS sensor, motor drivers, the stepper motors, and the batteries to support the Raspberry Pi. The enclosed structure is separated into two parts by an acrylic board: the upper part of the acrylic board locates azimuth motor while the lower part of the acrylic board is the controlling panel to keep the main control hardware of the prototype. The enclosed structure is made of steel frame except that the bottom plate of the enclosed structure is made of acrylic board. As indicated in the specification of the digital compass, it must be located at least 25.4 cm away from any metal or material that can influence the surrounding magnetic field. To isolate the digital compass from any metallic material, the digital compass is placed straight at the bottom plate (acrylic board) of enclosure structure so that all the metal structure is more than 25.4 cm away from the digital compass.For CPV cell, a cooling system is needed to ensure good heat dissipation. The rise of operating temperature in the solar cell will reduce its performance. A heat sink is attached at the bottom of the solar cell, preventing it from overheated under highly concentrated sunlight. To reduce the overall temperature inside the solar concentrator frame, we increase the ventilation by attaching another two fans at the bottom of the top box portion with opposite-facing directions. One fan serves as “fan-in” while the other one serves as “fan-out” to create an internal air circulation which rapidly brings the heat created by the concentrated sunlight outside the box.The motor driver serves as the interface between Raspberry Pi and the stepper motor to keep the motor actuation simple and straightforward where the Raspberry Pi just has to send the required pulses to the motor driver to activate the actuation. Stepper motor is chosen in our implementation and the commands that motor drivers receive are the number of steps and the direction of the actuation. There are two pulse modes for motor drivers: i.e., one-pulse mode and two-pulse mode in the hardware configuration. For one-pulse mode, motor driver receives only one pulse, which is the number of steps to actuate and the actuation is fixed either clockwise or anticlockwise throughout the entire usage. For two-pulse mode, motor driver receives two pulses, one is the number of steps to be actuated and another is the direction of this current actuation so that motor be actuated in both directions, i.e., clockwise and anticlockwise.In our system, the two-pulsed mode is adopted because the actuation angles can be more than 180° if we use one-pulse mode. For example, the motor needs to actuate from 0° to 290° in clockwise direction for one-pulse mode that is very time consuming and too much of time lagging, while two-pulse mode can allow the actuation to go in anticlockwise direction from 360° to 290° with angular movement of 70° only. The improvement might not necessary in stationary sun tracker due to the sun position changing slowly in the sky. However, this improvement is very critical for MST because the change of mobile platform can be drastic. For example, updates of azimuth and elevation angles can be abrupt especially when the mobile platform turns at the corner of a road and slow actuations will cause the sun-tracking system falling far behind the exact sun trajectory.Motor driver only takes step count, so the angle needs to be converted to steps before it is sent to motor driver by Raspberry Pi. Depending on the calculated rotational angles, the pulse direction that the microcontroller sends will be clockwise if the angle is less than 180° compared to the previous angle. Contrarily, the pulse direction that the microcontroller sends will be anticlockwise if the angle is more than 180°. The resolution of stepper motor used in our prototype is 0.0144° per step. The angle of less than 0.0144° or single-step size will not be actuated by the control system as the motor driver can only take integer number of pulses. To keep the solar concentrator closest to its tracking position, the remainders that are not included in the current and previous actuations will be accumulated into one or more steps in the next actuation.


## 2.6. Actuation Modes

In the case of stationary sun-tracking system, the routine sun-tracking process is a single direction from morning to evening, making continuous tracking and actuation activities simple. For MST system, even when the host vehicle moves on a straight line, the road conditions are not predictable that may cause the MST being over responsive towards unnecessary events such as changing of lanes and passing speed bump or bumpy roads. Even this short event is a temporary, it maybe overreacted by the control system and trigger the stepper motors of the sun tracker, which leads to unnecessary waste of energy. Moreover, the road condition sometimes may induce a high-frequency short-pulse signal in digital compass that fluctuates faster than the MST can respond immediately, and the delay response of MST can worsen the tracking accuracy, which reduce the effectiveness in solar energy harvesting. As such, it is important to understand that the MST system is designed to track the sun effectively but not to overrespond to the short event. To devise the sun-tracking operation more effectively, two different timing control schemes are investigated in our study: time lapse (TL) mode and azimuth actuation (AA) mode.In TL mode, the calculations of azimuth and elevation angles are performed periodically with a cyclic time oftL and the pulses are subsequently sent to the motor driver at the end of the cycle by Raspberry Pi. In AA mode, Raspberry Pi only sends the pulses to the motor driver when the difference of the latest calculated azimuth angle and current azimuth angle is more than the threshold angle, αTH. Both parameters tL and αTH are variables and can be reconfigured when the system is booted. Figure 5 shows the differences between the two algorithms where TL mode is a simple time-based loop to detect time elapse since last actuation, whereas AA mode is a condition-based loop to check if αTH is fulfilled for next actuation.Figure 5
Flow charts for time lapse (TL) and azimuth actuation (AA) modes.
(a)
Time Lapse (TL) mode(b)
Azimuth Actuation (AA) mode


## 3. Results and Discussions

### 3.1. Performance of the Filtering Algorithms

First, the output of the digital compass is analyzed to ensure that it is capable of responding to the changes of the direction precisely and to evaluate the performances of different filtering algorithms. Field measurement was carried out with the digital compass in vehicle travelling along a path according to the map as shown in Figure6. There were four immediate changes of directions, approximately including south to west (1⟶2), west to north (2⟶3), north to east (3⟶4), and east to south (4⟶1). Moreover, there were five speed bumps along the route, which had caused the sudden change in the output signal of digital compass. The heading angle or ϕ that shows the most significant change during the movement of vehicle is the measured facing direction of digital compass relative to the north.Figure 6
Driving path of the digital compass experiment.Figure7 shows the plots for the original and filtered cosine outputs of the heading angle (ϕ) that is measured by using the digital compass, i.e., cosϕ, SLRcosϕ, SMAcosϕ, and SMALRcosϕ. The aforementioned plots consider the MST system travelling a round trip in the clockwise direction according to the map as illustrated in Figure 6 in which the beginning point is marked with the “sun” logo in the Google map. In the plot, SLR-filtering algorithm (red line) shows exaggerated response to the change of direction (overshooting problem), where the effect becomes more severe particularly when the mobile platform changes direction rapidly. Contrary, SMA-filtering (green line) algorithm shows a slower response to the change of direction. In as much as both algorithms can compensate each other, newly developed compound-filtering algorithm or SMALR (dotted line) embraces the advantages from both SLR and SMA algorithms, showing faster and more stable response towards the change of direction.Figure 7
Plots for the original and filtered cosine outputs of the heading angle (ϕ) measured by the digital compass, i.e., cosϕ, SLRcosϕ, SMAcosϕ, and SMALRcosϕ, versus time for the MST system travelling a round trip following the map illustrated in Figure 6.Inspecting the responses of the three different algorithms from one of the straight paths right after turning, SMALR can catch up the raw data line much faster than both SLR and SMA lines, meaning that it can stabilize faster as depicted in Figure8. Even if the vehicle travelled along a straight path after a right angle turning, SLR (red) curve shows overresponse (pink box) with overshoot value and quickly recover back at 160 seconds by generating some unwanted noises (yellow circle) and being slow in response towards the raw data curve (green circle). On the hand, SMA (green) curve shows a slow response and takes almost the same time as SLR to approach the final value of 0.2 in which it has revealed less noise as compared to SLR. Last but not the least, the SMALR (black dash) curve reaches the final value of 0.2 at 155 seconds, which is around 5 seconds faster than both SLR and SMR. Moreover, the SMALR curve is the most stable with the least fluctuation among the three algorithms.Figure 8
Raw cosine-heading angle versus filtering algorithms (straight path after turning—North to East).In Figure9, cos (ζ) reveals a lot of spikes and noises as the vehicle travelled along the driving path at the moment from 10 to 70 seconds. In spite of the three algorithms capable of smoothening out the raw cosine data line, SMALR (violet) curve can generate relatively stable and the best fit curve to the raw cosine data for filtering the noises existed in the pitch angle ζ without any obvious information loss. In the highlighted brown box as shown in Figure 9, the digital compass captured a great fluctuation of pitch angle after the vehicle crossed over a speed bump where three algorithms responded differently. In this case, SLR (red) curve shows the largest response, which shoot up to 0.37 and then drop down to 0.24. For SMR (green) curve, it shows a slow response to the sudden change in angle ζ and information loss has occurred in the whole mechanism. Finally, SMALR (violet) curve shows the best response among the three algorithms with the angle increasing to 0.33 and going down to 0.27.Figure 9
Raw cosine pitch angle versus filtering algorithms.As there is no perfect flat road condition in real practice, the roll angle,λ, cannot be maintained at 0° at all times because the MST system tends to be slightly tilted to left or right sides (superelevation) especially when the vehicle passes horizontal curve. The four highlighted pink boxes in Figure 10 mark the abrupt change of angles as soon as the vehicle changed the moving direction. The lighter pink boxes show the response of digital compass upon the vehicle turning with large arc angles, while the darker pink boxes show the response of digital compass upon the mobile platform turning with small arc angles. In all the four highlighted boxes, the compound-filtering SMALR algorithm (black dash curve) shows faster response as compared to SMA algorithm (green line) and more stable value as compared to both SLR (red curve) and SMA (green curve). In general, SMA has slower response with significant lagging effect that has caused information loss while SLR overreacts to the changes of direction with significant overshoot as compared to the raw data from the digital compass.Figure 10
Raw cosine roll angleλ versus filtering algorithms (round trip).


### 3.2. Response Time

Next, we conducted a separate experiment to study the response time of the MST on a moving vehicle whose speed was maintained at 15 km/h. The results show that response time of MST during the abrupt change of direction is 7.68 s on average for the case without applying any filtering algorithms. When SLR and SMA are applied to filter the noises, the response times become 15.78 s and 18.30 s on average, respectively. In the case of compound filtering, i.e., SMALR, the average response time is 11.9 s on average. The response time can be affected by the driving speed upon turning corners, but we know that the driving speed upon corner turning is usually lower than the driving speed on the straight road. As a result, it is an advantage as such slow corner turning allows MST to have abundant time to close the slow-responding gap.


### 3.3. Evaluating the Sun-Tracking Accuracy

To analyze the accuracy of the MST system using novel SMALR-filtering algorithm, we installed a CCD (charged-coupled device) camera in the original position of the CPV module to record the solar images during the operation as shown in Figure11. Meanwhile, Figure 12 reveals the top part of solar concentrator frame is placed with sixty-four layers of dark blue cellophane papers to prevent the CCD camera from being overexposed while recording the solar image. A cross string is placed at the center of the cellophane papers with its intersection point serving as the central reference point for the location of CPV cell for a comparison with the position of solar image during sun-tracking. If the central point of solar image perfectly overlaps with the intersection point of the cross, the sun-tracking system is considered as 100% accurate. During the data collection, the solar image was captured by the CCD camera with a resolution of 1920×1280 pixels.Figure 11
Experiment setup for accuracy measurement experiments.Figure 12
Accuracy measurement experiments replace Fresnel lens with cellophane papers.We have tested two different modes for evaluating the accuracy of MST system, which are time lapse (TL) mode and azimuth actuation (AA) mode where the timing to capture the solar image is based on different control algorithms as listed in Figure5. For TL mode, solar image is captured in the events of two scenarios: a fixed interval time in the middle of the cycle tL and just after the actuation of the sun-tracking mechanism. For AA mode, solar image is captured in the events of two scenarios: immediately after the process of acquiring sun position angles and just after the actuation of the sun-tracking mechanism. After the on-site experiment was completed, the solar images were extracted from Raspberry Pi and then were analyzed using a specially designed program to find the central point of the solar image. From the recorded solar images, we can measure the pointing error in order to evaluate the accuracy of the MST system. Figure 13 shows one of the captured solar images by CCD camera in blue-colored background.Figure 13
A sample of solar image captured by CCD camera with blue colour background.To analyze the pointing error of solar image, a specially designed Python image-processing program called Self-Circle Center Coordinate (CCC) finder has been developed. The program can process the captured solar image in graphical format and returns the coordinates of the solar image relative to the intersectional point. Before processing the solar image, we need to find out the pixel coordinates of the intersection point of the cross in the same image file. Then, the maximum pointing error of all the solar images can be determined by the distance between the intersection point and the central point of the solar image extracted by CCC. For the calculation of the pointing error, it requires the distance between the central point of Fresnel lens (the intersectional point) and the central point of CPV cell (CCD camera). The pointing error can be calculated like the example below:(6)pixel⟶centimetre,14.3927pixels×0.02449centimetre=0.3525centimetre,tanγ=ThedistancebetweenthesolarimageandintersectionalpointThedistancebetweenthecentralpointofFresnellensandthecentralpointofCPVcell,tanγ=0.3525cm36.5cm,γ=9.658mrad.In Figure14, two experiments were conducted to study the distribution of pointing errors for the MST prototype without optical encoders as feedback sensors under stationary condition. The open-loop sun-tracking system is much more cost effective and less complicated as compared to structural closed-loop sun-tracking system. In the open-loop design, we do not need the expensive optical encoders and interface to detect the current position of solar collector after the stepper motor has been instructed to rotate to the desired position. We implement open-loop system for the prototype because the stepper motor can provide a reasonable accurate rotation to the solar collector with 0.0144° per step via stepping movement. The first experiment was carried out near solar noon from 1214 h to 1304 h on 13th April in which the data was collected for every 30 seconds with the average pointing error of 7 mrad and the maximum pointing error of 18 mrad as shown in Figure 15. The second experiment was conducted for a longer period from 1000 h to 1600 h on 17th May to evaluate the performance of prototype thoroughly. Figure 16 shows the result of pointing errors in which the average pointing error is 8 mrad and the maximum pointing error throughout the day is 25 mrad.Figure 14
Experiment setup to study the pointing error of prototype mobile sun-tracking system under stationary condition.Figure 15
Measurement result of pointing error for prototype mobile sun-tracking system under stationary condition on 13th April.Figure 16
Measurement result of pointing error for prototype mobile sun-tracking system under stationary condition during the period from 10 am to 4 pm on 17th May.To investigate the tracking accuracy of MST prototype in moving condition, experiments were carried out with the prototype placed on the deck of a small truck driving at a constant speed of 30 km/h. There are a few reasons that the small truck were driving at a constant speed of 30 km/h in our case study:(i)
The truck was driven in the residential area where the speed limit is 30 km/h in the location(ii)
Since the test road has many speed bumps along road, the speed of vehicle cannot be too fast that will cause a big shock to the solar concentrator system(iii)
Even the speed of truck is further increased to 50 km/h, the response of our system, including the algorithm (the average response time is 11.9 s) and drive mechanism, is sufficiently fast to react to the changes without any significant delayIn Figure17, the route of the truck was located near our campus with the starting point marked as “sun” logo in which the experiments were tested for two different control modes: TL and AA modes.Figure 17
Driving path of the small truck at constant speed of 30 km/h for the study of the tracking accuracy of prototype mobile sun-tracking system under moving condition.Figure18 shows the picture of MST prototype placed on the deck during the data collection. For each mode, the truck went through the same routes twice so that we could collect sufficient more data for analysis. There are many possible circumstances that happened beyond our control that had affected the data collection especially when the truck passed by shaded areas and in the occasion of the sun being blocked by the cloud. In the first experiment, TL mode was examined with interval time, tL, equal to 2 minutes.Figure 18
Experiment setup of prototype mobile sun-tracking system on a small truck to measure pointing error under moving condition.Figure19 depicts the pointing errors for TL mode collected from 1326 h to 1424 h with the average value of 127 mrad and maximum pointing error of 263 mrad. In the second experiment, AA mode was assessed with the triggering threshold set as 0.1 degree. Figure 20 shows the pointing errors for AA mode collected from 1145 h to 1228 h with the average pointing error of 110 mrad (13% better than that of TL mode) and maximum pointing error of 251 mrad, which is still far below the half acceptance angle of CCPC lens at 659 mrad.Figure 19
Measurement result of pointing error for prototype mobile sun-tracking system under moving condition using TL mode withtL=2minutes.Figure 20
Measurement result of pointing error for prototype mobile sun-tracking system under moving condition using AA mode with triggeringthreshold=0.1degree.In Figure20, we have identified the pointing errors caused by the external factor including road condition of the driving path chosen for the experiment. Blue circles indicate the pointing errors caused by speed bumps in the event of before and after the MST prototype crossing over the speed bumps. The pointing errors scatter in the region above the average pointing error line when the tracker attempted to readjust the solar concentrator for the new orientations. The pink rectangular box marks the pointing errors happened when the truck had changed the direction. All the aforementioned outliers have obviously caused significant increase in the average pointing error as compared to the stationary sun-tracking system.


## 3.1. Performance of the Filtering Algorithms

First, the output of the digital compass is analyzed to ensure that it is capable of responding to the changes of the direction precisely and to evaluate the performances of different filtering algorithms. Field measurement was carried out with the digital compass in vehicle travelling along a path according to the map as shown in Figure6. There were four immediate changes of directions, approximately including south to west (1⟶2), west to north (2⟶3), north to east (3⟶4), and east to south (4⟶1). Moreover, there were five speed bumps along the route, which had caused the sudden change in the output signal of digital compass. The heading angle or ϕ that shows the most significant change during the movement of vehicle is the measured facing direction of digital compass relative to the north.Figure 6
Driving path of the digital compass experiment.Figure7 shows the plots for the original and filtered cosine outputs of the heading angle (ϕ) that is measured by using the digital compass, i.e., cosϕ, SLRcosϕ, SMAcosϕ, and SMALRcosϕ. The aforementioned plots consider the MST system travelling a round trip in the clockwise direction according to the map as illustrated in Figure 6 in which the beginning point is marked with the “sun” logo in the Google map. In the plot, SLR-filtering algorithm (red line) shows exaggerated response to the change of direction (overshooting problem), where the effect becomes more severe particularly when the mobile platform changes direction rapidly. Contrary, SMA-filtering (green line) algorithm shows a slower response to the change of direction. In as much as both algorithms can compensate each other, newly developed compound-filtering algorithm or SMALR (dotted line) embraces the advantages from both SLR and SMA algorithms, showing faster and more stable response towards the change of direction.Figure 7
Plots for the original and filtered cosine outputs of the heading angle (ϕ) measured by the digital compass, i.e., cosϕ, SLRcosϕ, SMAcosϕ, and SMALRcosϕ, versus time for the MST system travelling a round trip following the map illustrated in Figure 6.Inspecting the responses of the three different algorithms from one of the straight paths right after turning, SMALR can catch up the raw data line much faster than both SLR and SMA lines, meaning that it can stabilize faster as depicted in Figure8. Even if the vehicle travelled along a straight path after a right angle turning, SLR (red) curve shows overresponse (pink box) with overshoot value and quickly recover back at 160 seconds by generating some unwanted noises (yellow circle) and being slow in response towards the raw data curve (green circle). On the hand, SMA (green) curve shows a slow response and takes almost the same time as SLR to approach the final value of 0.2 in which it has revealed less noise as compared to SLR. Last but not the least, the SMALR (black dash) curve reaches the final value of 0.2 at 155 seconds, which is around 5 seconds faster than both SLR and SMR. Moreover, the SMALR curve is the most stable with the least fluctuation among the three algorithms.Figure 8
Raw cosine-heading angle versus filtering algorithms (straight path after turning—North to East).In Figure9, cos (ζ) reveals a lot of spikes and noises as the vehicle travelled along the driving path at the moment from 10 to 70 seconds. In spite of the three algorithms capable of smoothening out the raw cosine data line, SMALR (violet) curve can generate relatively stable and the best fit curve to the raw cosine data for filtering the noises existed in the pitch angle ζ without any obvious information loss. In the highlighted brown box as shown in Figure 9, the digital compass captured a great fluctuation of pitch angle after the vehicle crossed over a speed bump where three algorithms responded differently. In this case, SLR (red) curve shows the largest response, which shoot up to 0.37 and then drop down to 0.24. For SMR (green) curve, it shows a slow response to the sudden change in angle ζ and information loss has occurred in the whole mechanism. Finally, SMALR (violet) curve shows the best response among the three algorithms with the angle increasing to 0.33 and going down to 0.27.Figure 9
Raw cosine pitch angle versus filtering algorithms.As there is no perfect flat road condition in real practice, the roll angle,λ, cannot be maintained at 0° at all times because the MST system tends to be slightly tilted to left or right sides (superelevation) especially when the vehicle passes horizontal curve. The four highlighted pink boxes in Figure 10 mark the abrupt change of angles as soon as the vehicle changed the moving direction. The lighter pink boxes show the response of digital compass upon the vehicle turning with large arc angles, while the darker pink boxes show the response of digital compass upon the mobile platform turning with small arc angles. In all the four highlighted boxes, the compound-filtering SMALR algorithm (black dash curve) shows faster response as compared to SMA algorithm (green line) and more stable value as compared to both SLR (red curve) and SMA (green curve). In general, SMA has slower response with significant lagging effect that has caused information loss while SLR overreacts to the changes of direction with significant overshoot as compared to the raw data from the digital compass.Figure 10
Raw cosine roll angleλ versus filtering algorithms (round trip).


## 3.2. Response Time

Next, we conducted a separate experiment to study the response time of the MST on a moving vehicle whose speed was maintained at 15 km/h. The results show that response time of MST during the abrupt change of direction is 7.68 s on average for the case without applying any filtering algorithms. When SLR and SMA are applied to filter the noises, the response times become 15.78 s and 18.30 s on average, respectively. In the case of compound filtering, i.e., SMALR, the average response time is 11.9 s on average. The response time can be affected by the driving speed upon turning corners, but we know that the driving speed upon corner turning is usually lower than the driving speed on the straight road. As a result, it is an advantage as such slow corner turning allows MST to have abundant time to close the slow-responding gap.


## 3.3. Evaluating the Sun-Tracking Accuracy

To analyze the accuracy of the MST system using novel SMALR-filtering algorithm, we installed a CCD (charged-coupled device) camera in the original position of the CPV module to record the solar images during the operation as shown in Figure11. Meanwhile, Figure 12 reveals the top part of solar concentrator frame is placed with sixty-four layers of dark blue cellophane papers to prevent the CCD camera from being overexposed while recording the solar image. A cross string is placed at the center of the cellophane papers with its intersection point serving as the central reference point for the location of CPV cell for a comparison with the position of solar image during sun-tracking. If the central point of solar image perfectly overlaps with the intersection point of the cross, the sun-tracking system is considered as 100% accurate. During the data collection, the solar image was captured by the CCD camera with a resolution of 1920×1280 pixels.Figure 11
Experiment setup for accuracy measurement experiments.Figure 12
Accuracy measurement experiments replace Fresnel lens with cellophane papers.We have tested two different modes for evaluating the accuracy of MST system, which are time lapse (TL) mode and azimuth actuation (AA) mode where the timing to capture the solar image is based on different control algorithms as listed in Figure5. For TL mode, solar image is captured in the events of two scenarios: a fixed interval time in the middle of the cycle tL and just after the actuation of the sun-tracking mechanism. For AA mode, solar image is captured in the events of two scenarios: immediately after the process of acquiring sun position angles and just after the actuation of the sun-tracking mechanism. After the on-site experiment was completed, the solar images were extracted from Raspberry Pi and then were analyzed using a specially designed program to find the central point of the solar image. From the recorded solar images, we can measure the pointing error in order to evaluate the accuracy of the MST system. Figure 13 shows one of the captured solar images by CCD camera in blue-colored background.Figure 13
A sample of solar image captured by CCD camera with blue colour background.To analyze the pointing error of solar image, a specially designed Python image-processing program called Self-Circle Center Coordinate (CCC) finder has been developed. The program can process the captured solar image in graphical format and returns the coordinates of the solar image relative to the intersectional point. Before processing the solar image, we need to find out the pixel coordinates of the intersection point of the cross in the same image file. Then, the maximum pointing error of all the solar images can be determined by the distance between the intersection point and the central point of the solar image extracted by CCC. For the calculation of the pointing error, it requires the distance between the central point of Fresnel lens (the intersectional point) and the central point of CPV cell (CCD camera). The pointing error can be calculated like the example below:(6)pixel⟶centimetre,14.3927pixels×0.02449centimetre=0.3525centimetre,tanγ=ThedistancebetweenthesolarimageandintersectionalpointThedistancebetweenthecentralpointofFresnellensandthecentralpointofCPVcell,tanγ=0.3525cm36.5cm,γ=9.658mrad.In Figure14, two experiments were conducted to study the distribution of pointing errors for the MST prototype without optical encoders as feedback sensors under stationary condition. The open-loop sun-tracking system is much more cost effective and less complicated as compared to structural closed-loop sun-tracking system. In the open-loop design, we do not need the expensive optical encoders and interface to detect the current position of solar collector after the stepper motor has been instructed to rotate to the desired position. We implement open-loop system for the prototype because the stepper motor can provide a reasonable accurate rotation to the solar collector with 0.0144° per step via stepping movement. The first experiment was carried out near solar noon from 1214 h to 1304 h on 13th April in which the data was collected for every 30 seconds with the average pointing error of 7 mrad and the maximum pointing error of 18 mrad as shown in Figure 15. The second experiment was conducted for a longer period from 1000 h to 1600 h on 17th May to evaluate the performance of prototype thoroughly. Figure 16 shows the result of pointing errors in which the average pointing error is 8 mrad and the maximum pointing error throughout the day is 25 mrad.Figure 14
Experiment setup to study the pointing error of prototype mobile sun-tracking system under stationary condition.Figure 15
Measurement result of pointing error for prototype mobile sun-tracking system under stationary condition on 13th April.Figure 16
Measurement result of pointing error for prototype mobile sun-tracking system under stationary condition during the period from 10 am to 4 pm on 17th May.To investigate the tracking accuracy of MST prototype in moving condition, experiments were carried out with the prototype placed on the deck of a small truck driving at a constant speed of 30 km/h. There are a few reasons that the small truck were driving at a constant speed of 30 km/h in our case study:(i)
The truck was driven in the residential area where the speed limit is 30 km/h in the location(ii)
Since the test road has many speed bumps along road, the speed of vehicle cannot be too fast that will cause a big shock to the solar concentrator system(iii)
Even the speed of truck is further increased to 50 km/h, the response of our system, including the algorithm (the average response time is 11.9 s) and drive mechanism, is sufficiently fast to react to the changes without any significant delayIn Figure17, the route of the truck was located near our campus with the starting point marked as “sun” logo in which the experiments were tested for two different control modes: TL and AA modes.Figure 17
Driving path of the small truck at constant speed of 30 km/h for the study of the tracking accuracy of prototype mobile sun-tracking system under moving condition.Figure18 shows the picture of MST prototype placed on the deck during the data collection. For each mode, the truck went through the same routes twice so that we could collect sufficient more data for analysis. There are many possible circumstances that happened beyond our control that had affected the data collection especially when the truck passed by shaded areas and in the occasion of the sun being blocked by the cloud. In the first experiment, TL mode was examined with interval time, tL, equal to 2 minutes.Figure 18
Experiment setup of prototype mobile sun-tracking system on a small truck to measure pointing error under moving condition.Figure19 depicts the pointing errors for TL mode collected from 1326 h to 1424 h with the average value of 127 mrad and maximum pointing error of 263 mrad. In the second experiment, AA mode was assessed with the triggering threshold set as 0.1 degree. Figure 20 shows the pointing errors for AA mode collected from 1145 h to 1228 h with the average pointing error of 110 mrad (13% better than that of TL mode) and maximum pointing error of 251 mrad, which is still far below the half acceptance angle of CCPC lens at 659 mrad.Figure 19
Measurement result of pointing error for prototype mobile sun-tracking system under moving condition using TL mode withtL=2minutes.Figure 20
Measurement result of pointing error for prototype mobile sun-tracking system under moving condition using AA mode with triggeringthreshold=0.1degree.In Figure20, we have identified the pointing errors caused by the external factor including road condition of the driving path chosen for the experiment. Blue circles indicate the pointing errors caused by speed bumps in the event of before and after the MST prototype crossing over the speed bumps. The pointing errors scatter in the region above the average pointing error line when the tracker attempted to readjust the solar concentrator for the new orientations. The pink rectangular box marks the pointing errors happened when the truck had changed the direction. All the aforementioned outliers have obviously caused significant increase in the average pointing error as compared to the stationary sun-tracking system.


## 4. Conclusion

The novel MST system has been proposed and constructed to implement mobile solar power system on marine vessels, electric vehicle (EV), and spacecraft. The major challenges of MST system include continuous change of the geographical coordinate, the fast change of heading direction, noises of GPS and digital compass, and optimization of the drive control timing: TL mode and AA mode. Among the three noise-filtering algorithms, SMALR is the most stable and the best fit curve to the raw cosine data for filtering the noises existed in all the tracking parameters: pitch angleζ, the roll angle λ, and heading angle ϕ without any obvious information loss. For the MST prototype with open-loop control under stationary condition, the average pointing error ranges from 7 mrad to 8 mrad and the maximum pointing error ranges from 18 mrad to 25 mrad. For MST prototype on the moving vehicle, the pointing errors for TL mode collected is 127 mrad in the average value and maximum pointing error of 263 mrad. In addition, AA mode has average pointing error of 110 mrad (13% better than that of TL mode) and maximum pointing error of 251 mrad, which is still far below the half acceptance angle of CCPC lens at 659 mrad. Since there is no feedback sensor to be implemented in this prototype, optical encoders and CCD camera can be employed in the future work to further improve the performance of MST system. Besides the MST system, the proposed algorithm can also be generalized for solving the problems in other kinds of control systems that requires real-time fast response with high-noise signals received from the sensors.



---

*Source: 9718993-2023-01-12.xml*