August 2020

Lookup Table Interpolator


Posted on August 15, 2020 by admin

Hey y’all, welcome back to my boring blog. This week’s post: LOOKUP TABLES, LOOKUP TABLES, AND MORE LOOKUP TABLES.

The IPM current setpoint lookup tables are notoriously annoying to generate because the situation really demands a three-axis table. Speed and throttle position are the obvious axis, but the lookup table is also a function of bus voltage because a higher bus voltage requires less field weakening for a given speed and throttle position. Field weakening more than required is OK, but reduces efficiency for a given power output. Not a huge deal though.

On the electric bike, I charge the battery to about 162 V and run it down to about 140 V. Previously, I’d just generated the lookup tables for 143V, which meant that for the first couple miles the resistive losses were about 25% higher than they could have been. If the bike nominally cruises at about 95% efficiency, the bad lookup tables will kick that down to 93.75%. Theoretically, fixing the lookup tables corresponds to a theoretical range increase of 1.3%… so we’re definitely splitting hairs here in terms of efficiency. However, it is a more or less free 1.3%, which can’t hurt to take. Where better lookup tables are more noticeable are in the high end power area, as peak power more or less linearly scales with bus voltage (which was not adequately used with the 143 V tables). Hypothetically these new lookup tables will give me a 12% boost in power when the battery is fresh, which is pretty cool.

Anyways I made an interpolator and threw the tables on. Here are some cool gifs of the tables changing as bus voltage is increased from 130V to 160V.

First, the Id setpoints:

The Iq setpoints:

Note the increase in Q axis current from about 4A to about 5A at max speed and max throttle, corresponding to a roughly 25% increase in bus voltage from the roughly 25% increase in bus voltage. Pretty cool!!!! Time to install the lookup tables on the bike.

Stay tuned!!


0