Development of a Bike-Sharing System Based on Pedal-Assisted Electric Bicycles for Bogota City

: The lack of sustainable solutions to mobility and transportation is a major problem in Latin American cities and requires prompt solutions. The main issues in Latin America are the high-cost of solutions, no inclusion of renewable energies, poor energy management, the use of foreign systems not adapted to local contexts, ineffective regional legislation and politics, among others. In this paper the main technical issues concerning the implementation of a bike-sharing system using pedaling-assisted (PAS) electric bicycles for Bogota City are discussed and a solution is proposed. To solve such problems, a methodology to design a tailored solution well suited to Bogota citizen’s needs is developed. Such methodology starts with the development of an on-board-computer (OBC) in order to characterize bike-users by collecting a rider’s data in real-time. Furthermore, the proposed solution develops a low-cost middle-drive (mid-drive) propulsion system for the PAS in the electric bike using brushless-DC (BLDC) motors and by implementing a ﬁeld-oriented controller (FOC). The reported bike-sharing system also includes the development and implementation of two charging-stations that enable charging the battery on the electric bikes exclusively by using photovoltaic energy. Experimental results are presented and discussed.


Introduction
Public transportation in Bogota City, Colombia, has critical and almost overwhelming problems (air pollution, traffic-jam, saturation, among others) that negatively impact the citizen's quality of life [1,2]. Although the problem is particularly dramatic in Bogota, according to [1] it is common in crowded cities and is particularly related to the Andean region due to cultural reasons. Therefore, alternative solutions for transportation and mobility are being promoted by local authorities. Moreover, the beginning of a transition in means of transportation has been witnessed worldwide to address new environmental, social and economic challenges [3].
Vehicles powered by electricity are one of the best alternatives to propulsion with fossil fuels. Among electric vehicles, the electric bicycle is the means of transportation with the highest growth as measured in the number of units sold per year [2,3]. Currently, the largest market for electric bicycles is China, reaching 170 million units in use by 2013. Health, economic and social benefits of bicycles sharing systems are reported in [2].
The commercial success of electric bicycles has increased the popularity of related technologies, promoted low-cost solutions and encouraged innovation in the area.
In Colombia, the electric bicycle as a transportation system is being introduced in markets using a model of "import-marketing", i.e., sellers buy overseas and re-sell to Colombian users. Therefore, bicycles with no added value to the Colombian traffic scenario are available to the public. The main consequences of this business model are: (i) lack of local support services; (ii) electric bicycles may not be suited to the topography of Colombian cities nor the usage routine of the users; (iii) lack of urban infrastructure available for charging electric bicycles; and (iv) most of imported bicycles lack efficient power systems, since the low cost of batteries overseas means energy efficiency is not a design priority.
The above context highlights the opportunities and challenges to Colombian industries to become developers of solutions and innovations in electric bicycles technologies. Opportunities in the Colombian context are supported since in Colombia there are: • A long-standing industry and experience in electric motors (e.g., Siemens), metalworking and machining. • Numerous companies dedicated to the design and manufacture of bicycles. • A deep-rooted culture of bicycle use. • National lawmaking, normativity and regulations encouraging the development, innovation and use of efficient energy solutions and alternative energy sources [4,5].
Therefore, since the year 2015 researchers from the School of Exact Sciences and Engineering (ECEI) from University Sergio Arboleda, in Bogota, have been working on answering the following question: • How should be a public transport system based on shared electric bicycles be implemented so that it is sustainable, safe and appropriate to the characteristics of the bike-users of Bogota City?
In order to address this matter, several elements must be considered: (i) the identification and quantification of the Latin American bike-user's needs, their habits and social context (e.g., high thefts rates and accidents); (ii) the use of assisted pedaling with low-cost sensors; (iii) the need to incorporate more efficient power alternatives, such as middle-drive (mid-drive) propulsion, that not only positively impacts the use of energy resources but also the environment; (iv) the ability to offer warranties and customer service over all the system components; and (v) integration of the electric bicycle system with mobile applications for rental services, among others.
In this paper, the development of a bike-sharing system based on pedal-assisted electric bikes for Bogota City is presented. In the present work are reported: (i) the characterization of Bogota bike-users using an embedded system; (ii) a mid-drive type propulsion system for the electric bicycle using brushless-DC (BLDC) motors and field-oriented controllers (FOC); and (iii) the development of charging stations for electric bikes exclusively using photovoltaic energy.
In the following, basic concepts related to bike-sharing systems, such as pedaling assistance systems (PAS), electric bike powertrains, batteries and Internet of Things (IoT) principles are reported. Then, Section 2 presents a brief outline of related work emphasizing state-of-the-art of information and communications technologies (ICT) for bike-sharing systems, as well as outstanding advances in charging systems for electric bicycles, developments in electric bicycles in Colombia, and some latest developments worldwide. In Section 3, different subsystems, such as the characterization of bike-users using on-board embedded systems, the design and implementation of a low-cost mid-drive propulsion system, and the development of photovoltaic charging stations are explained. In Section 4, several experiments carried out during the project and are reported and discussed. Finally, Section 5 presents concluding remarks are presented.

Electric Motors and Powertrain Systems for E-Bikes
Brushless-DC motors (BLDC) are well suited to be used in e-bikes since they are silent and efficient, have a long-lasting life, work well at low temperatures, and allow precise control of velocity and torque [10]. The efficient use of BLDC motors requires the continuous measurement of the motor windings position as well as the computation of precise control signals [11]. Nevertheless, the benefits of the current state-of-the-art in semiconductor components and the low cost of microprocessors has allowed the development of increasingly reliable and inexpensive controllers. Therefore, BLDC motors have become the most adopted option in the industry for the propulsion of light electric vehicles (LEV) and are usually the first choice for use in propulsion systems of electric bicycles.
The powertrain is the system used to transmit the power of the electric motor to the bicycle. For light electric vehicles (e.g., bicycles, tricycles, two-seater, etc.), powertrain developments with higher energy efficiency found in literature and available in the market are the mid-drive type (see Figure 1). In fact, in comparison with hub-type propulsion (front and rear), which is currently used in the Colombian market, the mid-drive type has many other advantages in addition to energy efficiency. These advantages include more stable behavior, suitability for use with e-bike gears, minimal impact on tire life, facilitation of e-bike maintenance, smaller battery requirement, greater torque, and better performance in rugged geography.

Pedaling Assistance Systems for Electric Bicycles
For the propulsion of electric bicycles there are two main schemes [6]: manual acceleration control and PAS. In the former, the electric motor can aid the user without pedaling. In the second, PAS, it is the pedaling action that activates the electric propulsion. The main advantage of PAS propulsion system is that it optimizes the use of the electric energy in the bicycle, in comparison with manual accelerator where energy is wasted, and battery autonomy is reduced. The PAS system is mandatory in electric bicycles in Europe (see Regulation (EU) No 168/2013 [7]), as well as in Colombia [8], so that the electric vehicle can be considered a bicycle. In Europe, electric bicycles with PAS are also called "pedelecs" [3].
The level of assistance of the electric motor in a PAS system is usually a function of the pedaling velocity. In the most efficient systems, the effort or torque applied by the user is measured to "help" the user with a power proportional to the effort the user is making [9]. In this technology, torque is measured with diverse sensors located in the bicycle chain, the pedals, the gears, or the bicycle frame. The main drawback of these sensors is their excessive cost (approximately USD 150-300).
Hereafter, the term "e-bike" will be used to refer to those electric bicycles equipped with PAS where the assistance cuts out when the user ceases to pedal or when the bicycle exceeds 25 km/h, according to Resolution No. 160 of 2 February 2017 [8], issued by the Ministry of Colombian Public Transportation, which regulates bicycles with PAS and their uses in Colombia. Resolution No. 160 also states that an e-bike with PAS should not weigh more than 35 kg and the electric motor in the bicycle should not have power greater than 0.35 kW.

Electric Motors and Powertrain Systems for E-Bikes
Brushless-DC motors (BLDC) are well suited to be used in e-bikes since they are silent and efficient, have a long-lasting life, work well at low temperatures, and allow precise control of velocity and torque [10]. The efficient use of BLDC motors requires the continuous measurement of the motor windings position as well as the computation of precise control signals [11]. Nevertheless, the benefits of the current state-of-the-art in semiconductor components and the low cost of microprocessors has allowed the development of increasingly reliable and inexpensive controllers. Therefore, BLDC motors have become the most adopted option in the industry for the propulsion of light electric vehicles (LEV) and are usually the first choice for use in propulsion systems of electric bicycles.
The powertrain is the system used to transmit the power of the electric motor to the bicycle. For light electric vehicles (e.g., bicycles, tricycles, two-seater, etc.), powertrain developments with higher energy efficiency found in literature and available in the market are the mid-drive type (see Figure  1). In fact, in comparison with hub-type propulsion (front and rear), which is currently used in the Colombian market, the mid-drive type has many other advantages in addition to energy efficiency. These advantages include more stable behavior, suitability for use with e-bike gears, minimal impact on tire life, facilitation of e-bike maintenance, smaller battery requirement, greater torque, and better performance in rugged geography. The most advanced mid-drive systems are based on a sensorless motor control scheme that measures the magnetic field produced by the motor in the windings [10,11]. This technique, by avoiding the use of external sensors, such as Hall effect sensors, reduces costs and increases the reliability of the system. Among these schemes, one of the most recent is the InstaSpin TM system [12] developed by Texas Instruments.
Future circuits for the control of motors will be able to reach better levels of efficiency and smaller sizes thanks to modern solid-state switch technologies, such as the MOSFET of Silicon Carbide (SiC) or of Gallium Nitride [13].

Energy Accumulators and Batteries for E-Bikes and Their Charging Systems
In Colombia, National law 1715 of May 2014 regulates and promotes the use of non-conventional sources of energy, as well as the generation of energy in homes and businesses and its integration with the power grid [4]. This law is an important element to encourage the use of photovoltaic energy in the charging of electric vehicle batteries in Colombia. Most of the technical aspects necessary to efficiently charge batteries from photovoltaic energy are already at a high level of sophistication and diverse solutions are available in the market [14].
In a typical photovoltaic charging system for batteries, the central controller receives energy generated by solar panels and uses several energy conversion circuits to transfer energy to the accumulators or to an external load. To achieve energy efficiency in the system, it is essential that the central controller tracks the maximum power point of the photovoltaic array (maximum power point tracking-MPPT) [15]. In addition, the central controller must provide energy to the batteries following a specific voltage and current profile, to ensure a long battery life. Battery charging voltage and current profiles are related to the battery technology used.
Charging of batteries, whether lead-acid, nickel-metal hydride (NiMH), nickel-cadmium (NiCd), lithium-ion (Li-ion), or less common types, such as nickel-hydrogen (NiH2) or lithium-iron phosphate (LiFePO4), operates according to similar principles regarding charging voltage and current profile [16]. It is common for the charge control circuit and the battery to be integrated.
Batteries for e-bikes must have a high energy density (i.e., to be light), be resistant to vibration and shock, and provide enough energy for the bicycle electric motor. The most commercially used The most advanced mid-drive systems are based on a sensorless motor control scheme that measures the magnetic field produced by the motor in the windings [10,11]. This technique, by avoiding the use of external sensors, such as Hall effect sensors, reduces costs and increases the reliability of the system. Among these schemes, one of the most recent is the InstaSpin TM system [12] developed by Texas Instruments.
Future circuits for the control of motors will be able to reach better levels of efficiency and smaller sizes thanks to modern solid-state switch technologies, such as the MOSFET of Silicon Carbide (SiC) or of Gallium Nitride [13].

Energy Accumulators and Batteries for E-Bikes and Their Charging Systems
In Colombia, National law 1715 of May 2014 regulates and promotes the use of non-conventional sources of energy, as well as the generation of energy in homes and businesses and its integration with the power grid [4]. This law is an important element to encourage the use of photovoltaic energy in the charging of electric vehicle batteries in Colombia. Most of the technical aspects necessary to efficiently charge batteries from photovoltaic energy are already at a high level of sophistication and diverse solutions are available in the market [14].
In a typical photovoltaic charging system for batteries, the central controller receives energy generated by solar panels and uses several energy conversion circuits to transfer energy to the accumulators or to an external load. To achieve energy efficiency in the system, it is essential that the central controller tracks the maximum power point of the photovoltaic array (maximum power point tracking-MPPT) [15]. In addition, the central controller must provide energy to the batteries following a specific voltage and current profile, to ensure a long battery life. Battery charging voltage and current profiles are related to the battery technology used.
Charging of batteries, whether lead-acid, nickel-metal hydride (NiMH), nickel-cadmium (NiCd), lithium-ion (Li-ion), or less common types, such as nickel-hydrogen (NiH 2 ) or lithium-iron phosphate (LiFePO 4 ), operates according to similar principles regarding charging voltage and current profile [16]. It is common for the charge control circuit and the battery to be integrated. Batteries for e-bikes must have a high energy density (i.e., to be light), be resistant to vibration and shock, and provide enough energy for the bicycle electric motor. The most commercially used batteries are Li-ion, lead-acid and NiMH [17]. Experimental developments with fuel cells are reported in [9].
Accumulators or stationary batteries are intended to support the solar panels by accumulating energy during photovoltaic production peaks and by supplying this energy to the external load when the panels do not generate enough energy. In the present work, the e-bike battery is the external load. The gel and Absorptive glass mat (AGM) valve-regulated lead-acid batteries (or VRLA batteries) technologies are the best-suited technologies for use as stationary accumulators since they receive large current peaks, have low cost and are maintenance free [16]. Gel and AGM batteries are 99% recyclable [18,19].

IoT and E-Bikes Sharing Systems
Many authors agree that the ability to obtain information in real time from various processes and activities will lead to the appearance of new kinds of services [20,21]. The so-called "Internet of Things (IoT)" is a concept that was used for the first time at the Massachusetts Institute of Technology (MIT) in 1999 to describe the possibilities of connecting objects (telephones, refrigerators, vehicles, houses, bicycles, etc.) with the web.
Currently, with the exponential growth of devices of different nature connected to the internet, these "objects" are acquiring their own identity and can interact with their environment (users or other devices/objects) through the transmission and reception of information by the network [21]. Moreover, objects connected to the web can not only be controlled remotely but also serve as access stations to Internet services [20]. Recent advances in ICT have allowed inclusion of communication and processing modules in these "objects", adding to the growing need of systems for greater "intelligence and autonomy", and making the IoT concept a reality [22].
Bicycles sharing systems are not far from this reality and multiple developments are oriented to traceability on the net [3,6,23].
New challenges associated with the IoT revolution refer to the processing and use of the large volumes of data that are generated. With current technology, most aspects of everyday life can be observed at an elevated level of detail at a low cost [20], which translates into thousands of data of diverse types that travel on the network and are stored. These challenges also impact bike-sharing systems.

Information and Communications Technologies for Bike-Sharing Systems
Since several cities around the world have implemented so-called "public bicycle exchange systems" (PBES) or bike-sharing systems (BSS), in which people can temporarily use bicycles anywhere in the city [2], the associated challenges concerning the availability and location of the bikes and the number and location of parking lots, as well as charging stations and its location, have become mayor issues in any bike-sharing scheme [3]. Complex systems of sensors on the bikes and rental points are usually implemented, aimed at understanding bike uses, routes and availability [24]. In 2013, the Mobility Department of Bogota City hired a consultancy that would provide information to promote the use of bicycles in the city. As one of the results of this consultation, a PBES proposal for Bogota City was published, including the incorporation of several ICT tools. Although this study was conducted largely by interviewing citizens, it did not consider the use of electric assisted propulsion (PAS) in bikes. Nevertheless, the statistics and proposals derived from this study do constitute a valuable input for the design of any electric bicycle system in Bogota City. In the following, some of the most recent and innovative ICT solutions for PBES in the world are presented.
In [25], a free-parking-lots prediction system is presented. The prediction system uses data collected from the biking system implemented in the city of Barcelona. The system has about 400 bike stations distributed around the city, each with a fixed number of parking lots that can be free (i.e., without a bike), occupied (with a bike waiting to be rented) or "out of service" (either because the bike or the parking lot itself is damaged). The user releases the bicycle out of the parking station using a radio-frequency identification (RFID) card, uses the bike to travel to his destination and leaves the bike in a parking lot. The system constantly checks the parking stations and provides information on the number of available bikes and free parking lots in real time. With this information the system performs bike users' trends analysis, recognizes high traffic stations and identifies mobility patterns.
In [24], the bike-sharing system allows the use of smartphones to provide the user with real time information about the availability of rental bikes and available parking spots. The mobile application presented in [24] also has additional features that may be attractive to users, such as calorie consumption and a bike availability prediction system. This work was carried out in the world's largest PBES system: the "Hangzhou public bicycle sharing system" in China.
Another valuable example of the impact of ICT in bike-sharing systems is the use of IoT in bicycles to determine if the biking routes (or segments of them) are safe and well suited to biking. In [26], the evaluation of a set of roads is carried out using a GPS system incorporated into public bicycles of the "Pedalro" PBES in the city of Ansan in Korea. Using the collected GPS data, the bike users' velocities, accelerations and stops were mapped to evaluate different routes. Using a classifier based on support vector machines, biking routes were classified as satisfactory or not. Similarly, [27] used a GPS system with braking sensors and a video camera on the bike to characterize the behavior of electric bicycles users in the city of Gothenburg, Sweden, and the possible dangers to which cyclists are exposed were highlighted.
In the following, a brief overview of two notable information and communications technologies that have greatly impacted mobility and, specifically, bike-sharing systems, are presented. These technologies are mobile apps for transportation and data mining from bike users.

Transportation and Mobile Apps
Apps for means of transportation and mobility have proliferated in recent years in parallel with technological advances. Both the web platform and the mobile platform have examples of support apps according to transport needs. Worth mentioning are those apps that handle information regarding public-transportation types of transportation, mass types (e.g., Moovit), personal types (e.g., Uber), private transportation with emphasis on sharing (closed to companies or educational centers), and specialized transportation for a certain group of population, e.g., apps for the visually impaired that are currently in trial versions.
Regarding bike users, mobile apps are being pioneered using a range of different types of technology. Informative apps are standing out with bikes capturing location data, routes, traffic conditions, activities for cyclists, and parking lots locations. These apps are usually specific to the city where they were initiated as academic initiatives (e.g., Buzz Santiago) or as private-sector initiatives (e.g., CityBikes, EcoBici). Other modalities of similar apps are those that create social networks around the bicycle culture, known as participative systems, which allow users to provide feedback on safety issues, routes, times and distances in real time.
Specifically, in Bogota City, there are already apps such as PlanBici for gathering information, and Biko, which is a proposal based on a business model to encourage the responsible use of bicycles. Through the mobile application, distance and velocity (not higher than 30 km/h) are recorded and measured to accumulate a currency called Biko that can be exchanged for commercial products in allied fast-food establishments, cinemas and others. The more it is used, evidencing a responsible use of bicycles, the more commercial incentives are received by the bicycle user.

Bike-Sharing Systems and Data Mining
The large volume of information collected by IoT systems such as PBES can be used in several ways. A current stream uses so-called data mining techniques to discover patterns and trends. In [28], the data of 38 public systems of bicycles in the world, in conjunction with data processing techniques, is used to find common points and improvement opportunities for all PBES. The results obtained serve as a point of reference to future research in the area or for the planning of new PBES systems. Similarly, in [29], data mining techniques are used to determine the potential effect of a public bicycle system in the city of Helsinki.
Smartphones are also a way to track bicycle users without needing to be integrated into PBES systems, providing the possibility of tracing a broader set of bike users. In Travis County, Texas, US, a mobile app was used to store geo-referenced information from several bicycle users who installed the app voluntarily. With the collected information, the most common places and routes for bike sports were identified [30]. In general, increase in the use of smartphones as the main communication and information capture device is evidenced in literature. This phenomenon responds, according to some authors, to the overcrowding and large computational capabilities of current devices. An analysis of apps for mobile devices focused on cyclists can be found in [31].
Other researchers, on the contrary, have developed their own systems for communication and information capture. In [32], an anti-theft system for bicycles was developed where the prototype allows GPS traceability of the cycle using GMS and GPRS as communication protocols.

Charging Systems for Electric Bicycles
At the University of Naples, wireless charging stations for electric bicycles are proposed [33]. The charging station proposal uses photovoltaic energy and a resonant inductive power transfer system (RITP) to charge the bike battery without wiring. The idea of the wireless system is to reduce the need for significant alterations to parking spots while maintaining the possibility of placing the bike without making a connection. The parking spot is endowed with the primary winding and the secondary winding is on the bike. The inductive charging system transfers the high frequency AC (alternating-current) power signal from the charging station to the secondary winding on the bike to be regulated into the DC (direct-current) signal required to charge the bike´s battery. The photovoltaic generation intends to give the system some autonomy from the grid by including batteries. However, it has a connection to the main grid which requires an electronic system of modular converters for the management of energy flow. Therefore, since it has connections to the main grid, solar panels and batteries, this charging station proposal is, actually, a distributed energy generation system.
In [34], a methodology to verify the design and performance of DC charging stations for electric two-wheelers is presented. This charging station is directly powered by the main grid and does not use renewable energy systems. Nevertheless, it uses an acid lead battery system as backup in order to reduce the impact of the charging operation on the main grid. The batteries taken as a reference for electric vehicles are LiFePO 4 , 51 V, 40 Ah, which are evaluated as the external load by using a buck-type converter.

Colombia
There are two relevant precursors for the technology of electric bicycles in Colombia that are worth mentioning. The first is related to the company Lucky Lion. This company currently offers franchises for the sale of its electric bicycles in Colombia. Lucky Lion announced plans in 2011 for the assembly of a manufacturing plant for its bicycles in Colombia, which must be carried out.
By contrast, in 2012 the Siemens Company announced an investment of more than USD 1 million for the adaptation of its plant in Tenjo, Cundinamarca, Colombia, for manufacturing a new generation of electric motors. This plant is currently in operation. This verifies that conditions for the development and manufacturing of electric motors in Colombia exist and that the Colombian market is attractive for the development of this technology.
The problem of mobility with electric vehicles in Colombia has been addressed by government initiatives such as the importation of vehicles for pilot tests, as for the case of the fleet of electric taxis currently circulating in Bogota City. Moreover, a number of sellers have now offered electric bicycles for several years. All these companies offer imported products, usually designed in the USA or in China.

Worldwide
Patents related to electric bicycles and similar devices have been registered since about 1880. As a result, many of the inventions are already in the public domain and little has changed in the concept of the electric bicycle since the 1980s.
The most significant evolution in electric bicycles occurred in the late 1990s with the mass production of neodymium magnets (used in motors) and Li-ion batteries. These two technologies allowed electric bicycles to have the power, autonomy and reliability that have made them so popular today. The latest innovations consist of the incorporation of on-board computers that perform a variety of functions.
Many accessories and systems for communication, control, administration and propulsion for electric bicycles are patented every year. In general, these patents are variations or adaptations to systems that already exist.
In particular, the bicycle management system registered in [35] incorporates important elements, such as alarms, bicycle status, load levels, and battery usage planning, which are not designed to increase the security of the user but can be adapted for that purpose. In terms of propulsion, recent patents include devices for the recovery and administration of motor power [36]. From previous research it has been found that in the rugged geography of Colombian mountains the potential energy can be sufficiently high so that a system of this type can be viable. The Optibike Company was a pioneer in high electric bicycles with mid-drive type performance. This company has patents for several developments [37], among which we highlight a system to maintain the battery at low temperatures and thus increase its useful life. Another patent [38], combines sensors with heart rate monitoring to regulate the power supplied to the bicycle engine.

Electronic Design and Development of an E-Bike-Sharing System for Bogota City
In this section, each stage and subsystem involved in the development of an e-bike-sharing system for Bogota City will be described. Before delving into the technical details of each stage of the project, an overview of the developed system is presented first.

System Overview
The design process is described by devising first the functional and technical requirements. The main requirements mainly stem from qualitative characteristics expressed by the users of bicycles in Bogota City and from desirable functionalities, e.g., moving from point A to point B effortlessly. In order to quantify these requirements, an embedded system that can characterize typical bike-users is developed. The embedded system is presented in Section 3.2.
The technical requirements are often derived from quantitative constraints obtained from functional requirements and technologies available in the market. In this section we focus on two main aspects of the technical description of a bike-sharing system: (i) a BLCD motor-based propulsion system for an electric bicycle with PAS, which, together with its electronic design, is reported in Section 3.3, and (ii) a photovoltaic charging station, which is described in Section 3.4. Finally, in Section 4, the implementation results for each of the e-bike-sharing system components are presented and discussed.

Embedded System for Bike-Users' Characterization
With the aim of identifying the characteristics required for an e-bike optimized for Bogota City, a quantitative methodology to study cyclist behavior is developed. This methodology includes the measurement of several parameters, such as velocity, power, gear ratio, etc., obtained from diverse types of cyclists in real scenarios, as well as interviews of bike users. The experimental evidence is used to quantify the minimum performance requirements for the e-bike.
The proposed methodology consists of acquiring and analyzing quantitative data related to the riding behavior of different type of cyclists in Bogota City ( Figure 2). The data are gathered trough a custom-made on-board computer (OBC) installed on each bicycle. The OBC records riding data for one week and then the information is downloaded and processed by software specifically developed for this project that returns the average values of ground velocity, pedaling frequency, cyclist power and travel time, the stops along each path, the geographical coordinates of the ride, and the voltage and current of the e-bike battery.  In the following, the OBC and the processing software are described, and in Section 4 some of the obtained results of the cyclist characterization are presented.

Custom-Made On-Board Computer OBC
The OBC used to capture the data consists of a microprocessor unit, a microSD slot, two reed switches to measure the rotation period on wheels and pedals, a GPS module, a signal conditioning stage for e-bikes' battery voltage and current, and a battery pack for the device power supply ( Figure  3). In the following, the OBC and the processing software are described, and in Section 4 some of the obtained results of the cyclist characterization are presented.

Custom-Made On-Board Computer OBC
The OBC used to capture the data consists of a microprocessor unit, a microSD slot, two reed switches to measure the rotation period on wheels and pedals, a GPS module, a signal conditioning stage for e-bikes' battery voltage and current, and a battery pack for the device power supply (Figure 3).
Signal conditioning is used to collect the information from the reed switches, the battery voltage and the battery current sensors (shunt resistor). For e-bike battery voltage and current measurement, two operational amplifiers with fixed gains are used, designed to accept a maximum battery voltage and current of 48 V and 10 A, respectively. After the conditioning stage, a 10-bit analog-to-digital converter (ADC) is used to register the battery voltage and current each second during a trip.
All the sensor data are stored in a "txt" file each second with GPS data. Once the trip is finished, the "txt" file is then processed by a custom-made software, which returns the trip information required by the present project. The processing software is presented in the following.

Custom-Made On-Board Computer OBC
The OBC used to capture the data consists of a microprocessor unit, a microSD slot, two reed switches to measure the rotation period on wheels and pedals, a GPS module, a signal conditioning stage for e-bikes' battery voltage and current, and a battery pack for the device power supply ( Figure  3).

Processing Software
The processing software, designed with Python coding language, asks, in a first stage, for the following set-up parameters: wheel size, cyclist and bike weight, and the location of the "txt" file with the data recorded by the OBC. Then, it initiates the reading and processing algorithm to provide the bicycle velocity, the cyclist pedaling cadence, the e-bike battery power (by processing the e-bike battery voltage and its current), the route map, the elevation profile and the cyclist power. A flowchart of the processing algorithm is depicted in Figure 4. Signal conditioning is used to collect the information from the reed switches, the battery voltage and the battery current sensors (shunt resistor). For e-bike battery voltage and current measurement, two operational amplifiers with fixed gains are used, designed to accept a maximum battery voltage and current of 48 V and 10 A, respectively. After the conditioning stage, a 10-bit analog-to-digital converter (ADC) is used to register the battery voltage and current each second during a trip.
All the sensor data are stored in a "txt" file each second with GPS data. Once the trip is finished, the "txt" file is then processed by a custom-made software, which returns the trip information required by the present project. The processing software is presented in the following.

Processing Software
The processing software, designed with Python coding language, asks, in a first stage, for the following set-up parameters: wheel size, cyclist and bike weight, and the location of the "txt" file with the data recorded by the OBC. Then, it initiates the reading and processing algorithm to provide the bicycle velocity, the cyclist pedaling cadence, the e-bike battery power (by processing the e-bike battery voltage and its current), the route map, the elevation profile and the cyclist power. A flowchart of the processing algorithm is depicted in Figure 4. The cyclist power is estimated using the model described in [9]. The power calculated is the total power required to provide bike and cyclist movement, which in a non-assisted bike is given only by the cyclist, and in pedal-assist e-bikes would be the sum of the power provided by the motor and the power provided by the cyclist.
The pedaling power, , is equal to the power required to overcome the forces counteracting The cyclist power is estimated using the model described in [9]. The power calculated is the total power required to provide bike and cyclist movement, which in a non-assisted bike is given only by the cyclist, and in pedal-assist e-bikes would be the sum of the power provided by the motor and the power provided by the cyclist.
The pedaling power, P ped , is equal to the power required to overcome the forces counteracting the movement, P Res , divided by the efficiency of the drive train system, η, as depicted by Equation (1): The efficiency factor from the drivetrain to the ground (frictional and elasticity losses) is set to 0.975. As described in Equations (2)-(6) (see Table 1), the resistance power, P Res , is calculated as the sum of the powers related to: aerodynamic drag, P air ; rolling resistance, P roll ; bearing resistance, P bearing ; power due to changes in potential energy, P Pe ; and, power due to changes in kinematic energy, P Ke .
Parameters used in Equations (2)-(6), such as the rolling resistance coefficient, C RR , the frontal area, A, and the drag coefficient, C D , are not calculated for each cyclist and bike, but included within the averaged values; therefore, results are expected to approximate the real power used by the cyclist. The fixed parameters used in Equations (2)-(6) are given in Table 2. Bicycle velocity relative to air 0 m/s 2 V A is assumed to be 0 m/s, neglecting its average impact when rolling in urban areas. The wind velocity is assumed to be 0. The time-dependent variables used in Equations (2)-(6) (e.g., V G (t), θ R (t), a(t)) are calculated with a sample time of 1s from the captured data. m T and r values, required in Equations (3), (5) and (6), depend on the current user and may vary between different users. The above parameters are presented in Table 3.

BLDC Based Motor Propulsion System for an Electric Bicycle
To provide a natural feeling to a cyclist when using a pedaling assistance system (PAS), a common strategy consists of performing an automatic adjustment of assistance level, proportional to the instantaneous power provided by the cyclist [9]. Hence, a method to obtain this cyclist power value must be incorporated in any design of a propulsion system for a bicycle.
Although most of the currently available cyclist power meters are expensive units, which are not viable for a shared bicycles system, different approaches to estimate cyclist power with reduced cost are proposed in the literature [17], and are good candidates for mass production [38]. In particular, in this project a prototype based on an inertial measurement unit (IMU) was validated.
Accordingly, a pedal assistance system motor control was developed assuming that cyclist torque measurement is implemented in the OBC and is operative. Next, the conception, design and experimental validation of this propulsion system control is presented. Torque measurement output is emulated with a signal generator.

Control Strategy
In general, cyclist power is proportional to the torque applied by the legs over the pedal levers. The shape of this torque waveform over time depends on factors like the type of pedals, cyclist behavior and road conditions.
In order to alleviate the torque input complexity as an entry of the motor controller, a simplified torque waveform is assumed, which represents the pedal torque over time, as shown in Figure 5. This corresponds to the expected output of a power estimator. Accordingly, a pedal assistance system motor control was developed assuming that cyclist torque measurement is implemented in the OBC and is operative. Next, the conception, design and experimental validation of this propulsion system control is presented. Torque measurement output is emulated with a signal generator.

Control Strategy
In general, cyclist power is proportional to the torque applied by the legs over the pedal levers. The shape of this torque waveform over time depends on factors like the type of pedals, cyclist behavior and road conditions.
In order to alleviate the torque input complexity as an entry of the motor controller, a simplified torque waveform is assumed, which represents the pedal torque over time, as shown in Figure 5. This corresponds to the expected output of a power estimator. The above signal has a specific frequency that depends on the linear velocity at which the rider is pedaling and the bike gear ratio. The pedaling velocity range is expected to be between 60 and 100 RPM (1-3.3 Hz), which is considered the point of maximum efficiency for an average rider [9].
Considering the effect of both pedal strokes and assuming that the PAS mainly operates during the same range of pedaling speed, the frequency range of the signal that emulates the required torque input, , is chosen to be between 2 and 3.3 Hz. To control the torque of a BLDC motor, a field-oriented controller (FOC) is a well-adapted and effective technique [12]. From [12], by handling the stator windings the FOC maintains the field produced by the permanent magnets of the rotor orthogonal to the stator field, therefore controlling the field allows torque control.
In order to allow control by FOC, three main tasks are carried out [39]: The above signal has a specific frequency that depends on the linear velocity at which the rider is pedaling and the bike gear ratio. The pedaling velocity range is expected to be between 60 and 100 RPM (1-3.3 Hz), which is considered the point of maximum efficiency for an average rider [9].
Considering the effect of both pedal strokes and assuming that the PAS mainly operates during the same range of pedaling speed, the frequency range of the signal that emulates the required torque input, f torque , is chosen to be between 2 and 3.3 Hz.
To control the torque of a BLDC motor, a field-oriented controller (FOC) is a well-adapted and effective technique [12]. From [12], by handling the stator windings the FOC maintains the field produced by the permanent magnets of the rotor orthogonal to the stator field, therefore controlling the field allows torque control.
In order to allow control by FOC, three main tasks are carried out [39]: • The currents of each of the three phases in the stators are measured. These are transformed from the static three-phase reference frame to the static two-phase reference frame, in which it passes from having three variables to two, the parameters α, β being from the Clarke transform. • From this reference frame, the next step is to move to the rotating two-phase reference frame by means of the Park transform, leaving two variables d, q. These two variables are controlled. • The next step is to perform the Park and Clarke inverse transforms remaining in the frame of the static three-phase reference; these are used for pulse-width SVM (space vector modulation) or SVPWM (space-vector pulse-width modulation).
This process is shown in Figure 6. In Figure 6 it is observed that only the current from two of the motor windings is necessary to obtain the α and β parameters from Kirchhoff's current law. The detailed position of the rotor is needed to perform the transform to the rotating frame. Measuring the rotor position can be performed by encoder sensor, detection of the zero crossings of the back electromagnetic field, complex sliding mode observers, and with extended Kalman filters [40].
In the next subsection, the FOC controller is developed. In Figure 6 it is observed that only the current from two of the motor windings is necessary to obtain the α and β parameters from Kirchhoff's current law. The detailed position of the rotor is needed to perform the transform to the rotating frame. Measuring the rotor position can be performed by encoder sensor, detection of the zero crossings of the back electromagnetic field, complex sliding mode observers, and with extended Kalman filters [40].
In the next subsection, the FOC controller is developed.

Motor Torque Control
To implement the motor torque controller, a model based on the InstaSPIN™ algorithm [12] is selected. This controller is of the proportional-integral (PI) type and incorporates a first order approximation for the motor model, as illustrated in Figure 7. In this model, if the integral gain, Ki, and the proportional gain, Kp, constants are properly selected, the existence of conjugated poles can be avoided. In particular, Ki can be selected to be equal to the pole of the plant as shown in Equation (7).
The obtained closed loop transfer function then becomes: Therefore, Kp can be calculated to adjust the desired bandwidth in the frequency response (where ω co is the G(s) cutoff frequency): Kp series = Ls·ω co (9) Electronics 2018, 7, x FOR PEER REVIEW 14 of 31 The obtained closed loop transfer function then becomes: Therefore, Kp can be calculated to adjust the desired bandwidth in the frequency response (where is the G(s) cutoff frequency):

Motor Control Implementation Details
In this application of bicycle pedal assistance, motor velocity is not controlled, since to guarantee the motor torque to be proportional to the pedal torque, the motor must be free to spin at any velocity (between 60 and 100 RPM, as mentioned before). With the aid of the InstaSPIN™ development platform from Texas Instruments running over the TMS320F28035 processor, the torque controller is implemented as shown in Figure 8.

Motor Control Implementation Details
In this application of bicycle pedal assistance, motor velocity is not controlled, since to guarantee the motor torque to be proportional to the pedal torque, the motor must be free to spin at any velocity (between 60 and 100 RPM, as mentioned before). With the aid of the InstaSPIN™ development platform from Texas Instruments running over the TMS320F28035 processor, the torque controller is implemented as shown in Figure 8.

Motor Control Implementation Details
In this application of bicycle pedal assistance, motor velocity is not controlled, since to guarantee the motor torque to be proportional to the pedal torque, the motor must be free to spin at any velocity (between 60 and 100 RPM, as mentioned before). With the aid of the InstaSPIN™ development platform from Texas Instruments running over the TMS320F28035 processor, the torque controller is implemented as shown in Figure 8.  As shown in Figure 8, the controller receives two set points: Iq and Id. To implement the controller in the micro-processor, the controller digital constants (Ki z , Kp z ) used in the FOC algorithm, are calculated. Ki z is simply determined by Equation (10): where Ti is the current controller period (66.6 µs in this platform). As explained previously, Kp is selected to adjust the controller bandwidth. As a starting point, a bandwidth of 1/20 of the current controller frequency is used [12]. The value of the parameter for the algorithm is computed as: where I f s and V f s are the full-scale current (A) and voltage (V), defined by the user in the platform. The controller was implemented and validated using the Texas Instruments development board DRV8301-HC-C2-KIT. Two different BLDC motors are considered in this propulsion system. The first is an Anaheim BLY342S-48V-3200 motor [41]. This model was selected because its operating voltage (48 V) and output power are well suited to the e-bike requirements and because its well-documented technical specifications facilitates the proper design and validation of the controller.
The second is an out-runner type BLDC motor (MTO 5065-170-HA-C, Maytech, Shanghai, China). This motor was selected due to its low cost and the expected possibility (from manufacturer specifications) of operating at high peak power levels for short time periods. However, the datasheet and technical information about this motor is very limited, thus requiring the running of an identification process to achieve a proper implementation of the control strategy. This is a case of evaluating the effectiveness of the identification and controller design processes. Accordingly, in Section 4 a controller is calculated and evaluated for each one of these motors.

Charging Station for E-Bike Sharing Systems
Since e-bikes are equipped with batteries that are required to be charged, bike-sharing systems frequently face mayor challenges regarding charging stations, their design, efficiency, use of renewable energies, and geographical distribution [3]. A solar supply system can be stand-alone or connected to the main grid in a vehicle-to-grid (V2G) configuration to assist the charging process. As described earlier, a typical solar supply system has a central controller that receives energy from the solar panels to transfer to the load.
In 2017, the School of Exact Sciences and Engineering (ECEI) of the Sergio Arboleda University in Bogota, Colombia, placed the BiCiSOLAR Solar Charging station for electric bikes at the disposal of the university community, free of charge. This charging station is powered exclusively by solar energy, in a stand-alone configuration, and can charge up to five e-bikes simultaneously. The BiCiSOLAR charging station has several extra parking spots with a DC charger directly from the main grid reserved for experimental research purposes only. These extra parking spots are not available to the public. Figure 9 shows renders of the mechanical design of the BiCiSOLAR Solar Charging station. In broad terms, the station comprises (i) a control panel that regulates voltage from the panels and outputs a steady 120 VAC for charging bikes, (ii) four solar panels and (iii) five public charging spots for bikes.

Solar Panels
In each module, the photovoltaic (PV) energy is generated by four 250W -24V polycrystalline solar panels in a series configuration.

Solar Charge Controller and Inverter
To achieve high efficiency in the system, the central controller must track the maximum power

Solar Panels
In each module, the photovoltaic (PV) energy is generated by four 250W -24V polycrystalline solar panels in a series configuration.

Solar Charge Controller and Inverter
To achieve high efficiency in the system, the central controller must track the maximum power

Solar Panels
In each module, the photovoltaic (PV) energy is generated by four 250W-24V polycrystalline solar panels in a series configuration.

Solar Charge Controller and Inverter
To achieve high efficiency in the system, the central controller must track the maximum power point of the panels array by using a MPPT strategy [15] and provide the required voltage and current profile to properly charge the batteries.
An electronic inverter BlueSolar Charge Controller MPPT 150/35 (see Figure 11) allows the BiCiSOLAR charging station to efficiently convert photovoltaic solar energy into 120VAC power at any time of the day.

Stationary Batteries
In the BiCiSOLAR station, Li-ion batteries of 48VDC@7Ah of the brand IBL are used as accumulators.
The BiCiSOLAR station serves two main purposes: it provides a service to the university community and is also a laboratory for projects in Efficient Conversion of Photovoltaic Solar Energy and its uses. In Section 4 we will show the uses by the university community of the BiCiSOLAR charging station between 12 April 2018 and 11 May 2018.

Results
This section presents the main results obtained for the characterization of e-bike users using the designed embedded system; the mid-drive type propulsion system designed for the electric bicycle using BLDC motors and FOC; and, the development of charging stations for electric bikes using photovoltaic energy exclusively. Results are organized as follows: first, in Section 4.1, the results obtained from the OBC regarding the estimation of cyclist power and the e-bike user's profile are presented. In Section 4.2, the mid-drive benchmark used to test the controller designed for the BLDC motors is described and several controller performance tests results are related. Finally, in Section 4.3, the photovoltaic charging stations are presented and performance results are reported.

Embedded System for Bike-Users Characterization
The OBC operation was validated by placing the device on four different bicycles and recording data for one week. The information was processed using the processing software (see Section 3.2.2). Next, the obtained results are analyzed.

Cyclist Power Estimation
The gradient (θR) is obtained from the GPS unit data. It was found that the obtained elevation

Stationary Batteries
In the BiCiSOLAR station, Li-ion batteries of 48VDC@7Ah of the brand IBL are used as accumulators.
The BiCiSOLAR station serves two main purposes: it provides a service to the university community and is also a laboratory for projects in Efficient Conversion of Photovoltaic Solar Energy and its uses. In Section 4 we will show the uses by the university community of the BiCiSOLAR charging station between 12 April 2018 and 11 May 2018.

Results
This section presents the main results obtained for the characterization of e-bike users using the designed embedded system; the mid-drive type propulsion system designed for the electric bicycle using BLDC motors and FOC; and, the development of charging stations for electric bikes using photovoltaic energy exclusively. Results are organized as follows: first, in Section 4.1, the results obtained from the OBC regarding the estimation of cyclist power and the e-bike user's profile are presented. In Section 4.2, the mid-drive benchmark used to test the controller designed for the BLDC motors is described and several controller performance tests results are related. Finally, in Section 4.3, the photovoltaic charging stations are presented and performance results are reported.

Embedded System for Bike-Users Characterization
The OBC operation was validated by placing the device on four different bicycles and recording data for one week. The information was processed using the processing software (see Section 3.2.2). Next, the obtained results are analyzed.

Cyclist Power Estimation
The gradient (θ R ) is obtained from the GPS unit data. It was found that the obtained elevation value is very noisy (see Figure 12, blue) because of its sensitivity to fluctuations in position data, which is an inherent characteristic of GPS operation. These rapid and erroneous transitions are not acceptable for the power computation. Accordingly, the elevation profile vector was pre-processed using a low pass filter implemented with a mobile average window of n positions (see Equation (12)). The result of each averaging iteration is placed in a new vector, vf. The process is iterated until vf have the same length of the nonfiltered vector (see Figure 12, green). Experimentally a value of n = 100 was selected.
This Pped power estimator was validated experimentally through comparison against a commercial cyclist power measurement unit (PowerTap P1S). Data are simultaneously recorded by the PowerTap P1S and by the developed OBC for a 33 km flat ride followed by a 7 km climb without stops. The comparison of the two recorded power vectors shows that the power profile recorded on the flat ride and during the climb by both devices, as well as the average power computed (93.27 W for OBC, 120.34 W for PowerTap), are sufficiently close for the study (see Figure 13). Therefore, OBC power estimation can be trusted and used. Accordingly, the elevation profile vector was pre-processed using a low pass filter implemented with a mobile average window of n positions (see Equation (12)). The result of each averaging iteration is placed in a new vector, v f . The process is iterated until v f have the same length of the non-filtered vector (see Figure 12, green). Experimentally a value of n = 100 was selected.
This P ped power estimator was validated experimentally through comparison against a commercial cyclist power measurement unit (PowerTap P1S). Data are simultaneously recorded by the PowerTap P1S and by the developed OBC for a 33 km flat ride followed by a 7 km climb without stops. The comparison of the two recorded power vectors shows that the power profile recorded on the flat ride and during the climb by both devices, as well as the average power computed (93.27 W for OBC, 120.34 W for PowerTap), are sufficiently close for the study (see Figure 13). Therefore, OBC power estimation can be trusted and used. commercial cyclist power measurement unit (PowerTap P1S). Data are simultaneously recorded by the PowerTap P1S and by the developed OBC for a 33 km flat ride followed by a 7 km climb without stops. The comparison of the two recorded power vectors shows that the power profile recorded on the flat ride and during the climb by both devices, as well as the average power computed (93.27 W for OBC, 120.34 W for PowerTap), are sufficiently close for the study (see Figure 13). Therefore, OBC power estimation can be trusted and used.

E-Bike Battery Power Measurement
To ensure accurate measurement of the e-bike battery energy and power by the OBC, a calibration process was performed. First, a known voltage over a known load, calibrated with a Fluke 115 multi-meter, is placed at the OBC's ADC, and compared against the actual battery current and voltage values read by the OBC and saved in the log file (see Figure 14). This procedure was repeated for a range of 0-48 V and 1-3 A, verifying the linear response and stability of the voltage and current acquisition system. Next, the ADC output to voltage and current input gains were calculated. These gains values are subsequently used by the processing software to obtain the battery energy and power values from the log file. The maximum errors were 1.71% and 1.83% for voltage and current respectively.

E-Bike Battery Power Measurement
To ensure accurate measurement of the e-bike battery energy and power by the OBC, a calibration process was performed. First, a known voltage over a known load, calibrated with a Fluke 115 multi-meter, is placed at the OBC's ADC, and compared against the actual battery current and voltage values read by the OBC and saved in the log file (see Figure 14). This procedure was repeated for a range of 0-48 V and 1-3 A, verifying the linear response and stability of the voltage and current acquisition system. Next, the ADC output to voltage and current input gains were calculated. These gains values are subsequently used by the processing software to obtain the battery energy and power values from the log file. The maximum errors were 1.71% and 1.83% for voltage and current respectively. This battery monitoring feature of the OBC will be exploited in future work for the study of ebikes on road conditions and for comparison with human-only propelled bicycles. The results will be compared with different approaches, e.g., naturalistic driven studies [42].

E-Bike User's Power profiles
In Figure 15, data recorded by the OBC for four different cyclists, performing seven trips each, are reported. The average velocity is always lower than 25 km/h, in line with Resolution No. 160 of 2 February 2017 [8], that regulates bicycles with PAS in Colombia. The average cyclist cadence is between 50 and 70 RPM which, according to [9], is optimum for lower power outputs since a higher cadence might increase fatigue. This battery monitoring feature of the OBC will be exploited in future work for the study of e-bikes on road conditions and for comparison with human-only propelled bicycles. The results will be compared with different approaches, e.g., naturalistic driven studies [42].

E-Bike User's Power profiles
In Figure 15, data recorded by the OBC for four different cyclists, performing seven trips each, are reported. The average velocity is always lower than 25 km/h, in line with Resolution No. 160 of 2 February 2017 [8], that regulates bicycles with PAS in Colombia. The average cyclist cadence is between 50 and 70 RPM which, according to [9], is optimum for lower power outputs since a higher cadence might increase fatigue.
In Figure 15, data recorded by the OBC for four different cyclists, performing seven trips each, are reported. The average velocity is always lower than 25 km/h, in line with Resolution No. 160 of 2 February 2017 [8], that regulates bicycles with PAS in Colombia. The average cyclist cadence is between 50 and 70 RPM which, according to [9], is optimum for lower power outputs since a higher cadence might increase fatigue. The average power of the four cyclists is maintained below 200 W, with most values under 100 W. The overall power registered for all trips is 1600 W; 21% of the maximum power on each trip is over 1000 W, 13% below 100 W, 43% between 100 and 300 W, and 21% between 300 and 1000 W. Analyzing the plots of power and velocity shows that the maximum power peaks are registered just after a stop, when acceleration and power are both at maximums. The average power of the four cyclists is maintained below 200 W, with most values under 100 W. The overall power registered for all trips is 1600 W; 21% of the maximum power on each trip is over 1000 W, 13% below 100 W, 43% between 100 and 300 W, and 21% between 300 and 1000 W. Analyzing the plots of power and velocity shows that the maximum power peaks are registered just after a stop, when acceleration and power are both at maximums.
While the average time of travel is between 30 and 60 min, one user spent 135 min. This trip consumed 500 kJ from the cyclist, while the other trips consumed below 150 kJ.

BLDC Motor-Based Propulsion System for an E-Bike
Two different test benchmarks are used for the assessment of each of the motor torque controllers. The first platform is a stationary bench, which allows easy adjustment of the BLDC motor load. This bench is based on an induction motor directly coupled to the BLDC motor under test as shown in Figure 16. The load (Siemens 1LA7 070-4YC60 motor) is controlled using a Sinamics G120 inverter operating in vector mode to adjust the torque delivered to the BLDC motor.

BLDC Motor-Based Propulsion System for an E-Bike
Two different test benchmarks are used for the assessment of each of the motor torque controllers. The first platform is a stationary bench, which allows easy adjustment of the BLDC motor load. This bench is based on an induction motor directly coupled to the BLDC motor under test as shown in Figure 16. The load (Siemens 1LA7 070-4YC60 motor) is controlled using a Sinamics G120 inverter operating in vector mode to adjust the torque delivered to the BLDC motor. The second platform used for the test of the out-runner motor is a mid-drive propulsion system integrated onto a bicycle (see Figure 17). This propulsion system is mid-drive type and couples the motor to the pedals through a chain using a 5:32 gear ratio. The bicycle is mounted over a test bench with inertia cylinders, specifically designed for this project. The load applied to the bicycle is kept constant. The second platform used for the test of the out-runner motor is a mid-drive propulsion system integrated onto a bicycle (see Figure 17). This propulsion system is mid-drive type and couples the motor to the pedals through a chain using a 5:32 gear ratio. The bicycle is mounted over a test bench with inertia cylinders, specifically designed for this project. The load applied to the bicycle is kept constant.
The second platform used for the test of the out-runner motor is a mid-drive propulsion system integrated onto a bicycle (see Figure 17). This propulsion system is mid-drive type and couples the motor to the pedals through a chain using a 5:32 gear ratio. The bicycle is mounted over a test bench with inertia cylinders, specifically designed for this project. The load applied to the bicycle is kept constant.
In a similar way, the required parameters for the MTO 5065-170-HA-C motor are found. The obtained results for both motors are summarized in Table 4. The maximum reference of Iq for the experimental validation is 4 A. It was not possible to increase the Iq reference due to mechanical instability. The torque reference signal comes from a rectifier bridge, whose input is a sine signal. It was also established that the minimum reference point for Iq in the controller is 0.5 A to prevent the engine from totally stopping at some point.
In Figures 18 and 19, the yellow signal corresponds to the signal coming from a diode bridge, which has a frequency of 2 Hz. The blue signal is the current measurement in a motor winding. Finally, the violet signal is the average current of the DC source at 48 V.
increase the Iq reference due to mechanical instability. The torque reference signal comes from a rectifier bridge, whose input is a sine signal. It was also established that the minimum reference point for Iq in the controller is 0.5 A to prevent the engine from totally stopping at some point.
In Figures 18 and 19, the yellow signal corresponds to the signal coming from a diode bridge, which has a frequency of 2 Hz. The blue signal is the current measurement in a motor winding. Finally, the violet signal is the average current of the DC source at 48 V.  The motor control was tested for different pedaling torque signal frequencies, corresponding to different user scenarios. This signal is generated externally and the pedals are free to spin at the motor spinning frequency.
In Figure 20, a half-wave rectified signal is used as reference for iq (yellow). A motor winding current is observed to follow the reference. The current does not become zero because the algorithm ensures a minimum current to flow through the motor to avoid instability (evidenced experimentally). The motor control was tested for different pedaling torque signal frequencies, corresponding to different user scenarios. This signal is generated externally and the pedals are free to spin at the motor spinning frequency.
In Figure 20, a half-wave rectified signal is used as reference for iq (yellow). A motor winding current is observed to follow the reference. The current does not become zero because the algorithm ensures a minimum current to flow through the motor to avoid instability (evidenced experimentally).
In Figure 21, the reference signal frequency increases, consistent with a cyclist pedaling faster. In this case, the period of the motor current and the pedaling frequency became comparable, degrading the ability to track the pedaling torque with precision. This could be solved by increasing the gear ratio between the motor and the pedaling sprockets. Figure 22 shows the response of the system to rejection of disturbances, in which the bicycle is turning and the pedals are suddenly subjected to braking. In Figures 23-26, several responses of the system to the rejection of disturbances are shown. The first two cases refer to a variation in the set-point as the pedaling frequency varies with a fixed amplitude. The last two cases refer to a variation in the set-point amplitude while maintaining the frequency. As shown in all these figures, the system stabilizes either at the initial condition or the new condition.
The motor control was tested for different pedaling torque signal frequencies, corresponding to different user scenarios. This signal is generated externally and the pedals are free to spin at the motor spinning frequency.
In Figure 20, a half-wave rectified signal is used as reference for iq (yellow). A motor winding current is observed to follow the reference. The current does not become zero because the algorithm ensures a minimum current to flow through the motor to avoid instability (evidenced experimentally). In Figure 21, the reference signal frequency increases, consistent with a cyclist pedaling faster. In this case, the period of the motor current and the pedaling frequency became comparable, degrading the ability to track the pedaling torque with precision. This could be solved by increasing the gear ratio between the motor and the pedaling sprockets.  Figure 22 shows the response of the system to rejection of disturbances, in which the bicycle is turning and the pedals are suddenly subjected to braking. In Figures 23-26, several responses of the system to the rejection of disturbances are shown. The first two cases refer to a variation in the setpoint as the pedaling frequency varies with a fixed amplitude. The last two cases refer to a variation in the set-point amplitude while maintaining the frequency. As shown in all these figures, the system stabilizes either at the initial condition or the new condition.   Figure 22 shows the response of the system to rejection of disturbances, in which the bicycle is turning and the pedals are suddenly subjected to braking. In Figures 23-26, several responses of the system to the rejection of disturbances are shown. The first two cases refer to a variation in the setpoint as the pedaling frequency varies with a fixed amplitude. The last two cases refer to a variation in the set-point amplitude while maintaining the frequency. As shown in all these figures, the system stabilizes either at the initial condition or the new condition.             Considering the results shown in the above figures, Table 5, and the system response settling time when subjected to disturbances, it is established that the system responds quite well to disturbances, with the worst case occurring when the brake was generated intentionally within 0.3 seconds. These response times are practically imperceptible for the user.

Charging Station for E-Bike Sharing Systems
In Figures 27 and 28, the BiCiSolar charging stations available at Sergio Arboleda University are shown. Two stations were implemented so that ten e-bikes can be simultaneously charged. Each station is located in the university campus with the solar panels facing south at a fixed 6° angle to the horizontal.  Considering the results shown in the above figures, Table 5, and the system response settling time when subjected to disturbances, it is established that the system responds quite well to disturbances, with the worst case occurring when the brake was generated intentionally within 0.3 seconds. These response times are practically imperceptible for the user.

Charging Station for E-Bike Sharing Systems
In Figures 27 and 28, the BiCiSolar charging stations available at Sergio Arboleda University are shown. Two stations were implemented so that ten e-bikes can be simultaneously charged. Each station is located in the university campus with the solar panels facing south at a fixed 6 • angle to the horizontal. Considering the results shown in the above figures, Table 5, and the system response settling time when subjected to disturbances, it is established that the system responds quite well to disturbances, with the worst case occurring when the brake was generated intentionally within 0.3 seconds. These response times are practically imperceptible for the user.

Charging Station for E-Bike Sharing Systems
In Figures 27 and 28, the BiCiSolar charging stations available at Sergio Arboleda University are shown. Two stations were implemented so that ten e-bikes can be simultaneously charged. Each station is located in the university campus with the solar panels facing south at a fixed 6° angle to the horizontal.  Several phenomena regarding photovoltaic installations have been studied using the BiCiSOLAR charging station, such as partial shading conditions (PSC) [43]. This phenomenon deforms the P-V (power-voltage) curve of the photovoltaic array, reduces its efficiency, and presents major issues for conventional MPPT algorithms due to the presence of multiple maxima in the P-V curve, requiring nonconventional maximum power-point detection techniques [44]. In Figure 29, the PSC phenomenon in the BiCiSOLAR charging stations is presented and in Figure 30 the P-V curve deformation due to such phenomena is depicted. Several phenomena regarding photovoltaic installations have been studied using the BiCiSOLAR charging station, such as partial shading conditions (PSC) [43]. This phenomenon deforms the P-V (power-voltage) curve of the photovoltaic array, reduces its efficiency, and presents major issues for conventional MPPT algorithms due to the presence of multiple maxima in the P-V curve, requiring nonconventional maximum power-point detection techniques [44]. In Figure 29, the PSC phenomenon in the BiCiSOLAR charging stations is presented and in Figure 30 the P-V curve deformation due to such phenomena is depicted.  Several phenomena regarding photovoltaic installations have been studied using the BiCiSOLAR charging station, such as partial shading conditions (PSC) [43]. This phenomenon deforms the P-V (power-voltage) curve of the photovoltaic array, reduces its efficiency, and presents major issues for conventional MPPT algorithms due to the presence of multiple maxima in the P-V curve, requiring nonconventional maximum power-point detection techniques [44]. In Figure 29, the PSC phenomenon in the BiCiSOLAR charging stations is presented and in Figure 30 the P-V curve deformation due to such phenomena is depicted. Figure 29. Partial shading phenomenon PSC in BiCiSOLAR charging station. Figure 29. Partial shading phenomenon PSC in BiCiSOLAR charging station.
In Figure 30, it can be seen that the maximum power point is not only lower, reducing the photovoltaic array efficiency, but also that several maxima appear. In Figure 30, it can be seen that the maximum power point is not only lower, reducing the photovoltaic array efficiency, but also that several maxima appear. As the BiCiSOLAR station also serves as a laboratory for projects in Efficient Conversion of Photovoltaic Solar Energy, the phenomenon presented in Figure 30 is currently under study by the researchers and students at the Sergio Arboleda University. In Figure 31, use by the university community of the BiCiSOLAR charging station between 11 April 2018 and 6 May 2018 is depicted. Figure 31 shows that despite variations in power generated by the PV array due to irradiance variation and meteorological conditions (cloudy days), battery voltage remains almost constant at around 49.5 V, with small variations of smaller than 2% of the battery charge. Consumption (in Wh) shows that the day the charging station was used most was 5 May. The lowest consumption corresponds with weekends and holidays. As the BiCiSOLAR station also serves as a laboratory for projects in Efficient Conversion of Photovoltaic Solar Energy, the phenomenon presented in Figure 30 is currently under study by the researchers and students at the Sergio Arboleda University. In Figure 31, use by the university community of the BiCiSOLAR charging station between 11 April 2018 and 6 May 2018 is depicted. Figure 31 shows that despite variations in power generated by the PV array due to irradiance variation and meteorological conditions (cloudy days), battery voltage remains almost constant at around 49.5 V, with small variations of smaller than 2% of the battery charge. Consumption (in Wh) shows that the day the charging station was used most was 5 May. The lowest consumption corresponds with weekends and holidays. In Figure 30, it can be seen that the maximum power point is not only lower, reducing the photovoltaic array efficiency, but also that several maxima appear. As the BiCiSOLAR station also serves as a laboratory for projects in Efficient Conversion of Photovoltaic Solar Energy, the phenomenon presented in Figure 30 is currently under study by the researchers and students at the Sergio Arboleda University. In Figure 31, use by the university community of the BiCiSOLAR charging station between 11 April 2018 and 6 May 2018 is depicted. Figure 31 shows that despite variations in power generated by the PV array due to irradiance variation and meteorological conditions (cloudy days), battery voltage remains almost constant at around 49.5 V, with small variations of smaller than 2% of the battery charge. Consumption (in Wh) shows that the day the charging station was used most was 5 May. The lowest consumption corresponds with weekends and holidays.

Discussion
This paper reported the development of a bike-sharing system for bikes with PAS for Bogota City and experimental results performed at Sergio Arboleda University Campus located in Bogota, Colombia. The system's main developments include the characterization of bike-users using on-board embedded systems, the design and implementation of a low-cost mid-drive propulsion system, and the development of photovoltaic charging stations for e-bikes.
The exploratory review of state-of-the-art technologies revealed that several solutions are mature enough to be used and adapted to design solutions best adapted to local issues. Encouraging the innovation and development of solutions tailored to local issues, such as economic and social factors, is crucial.
Given that the proposed solutions are designed with consideration of the local context, they are better suited to the bike users of Bogota City than the many existing solutions available in the market.
As reported in the paper, an important corpus of research and development has been carried out in the field of electric bicycles, which has seen them incorporated into the current IoT trend. As an example, the paper reports the development of an on-board-computer (OBC) to characterize bike-users by collecting, in real time, bicycle user's data, such as bike speed, pedaling frequency, stops, and route lengths, and electric variables from the bicycles, such as battery current and voltage. The data acquired are used to derive cyclist riding profiles in order to design e-bike system controllers that consider the electrical requirements for a bicycle propulsion system.
The study showed that the use of a rectified semi-sinusoidal signal as a motor torque modulator is effective to control power and to ensure that torque follows the average effort made by the bike-user. The rectified semi-sinusoidal signal corresponds to the torque performed by a bike-user when pedaling.
The use of FOC as a control strategy reduced computational burden, thereby reducing the embedded systems cost. In addition, excellent performance was achieved for control of the motor current.
Future security enhancement for the e-bike are pursue in obstacle avoidance systems [45] and place recognition [46] towards autonomous driving.
A major issue in the implementation of e-bike sharing systems is the location and availability of charging stations, as realized by the authors when searching for the right location on the university campus to place the BiCiSolar charging stations. The charging stations also provided information regarding user habits, which can be used to make strategic decisions, such as the placement of additional charging stations or the relocation of existing stations.