Wednesday, December 7, 2016

St. Lucia - Day Four

Today has been non-stop contacts across the entire group on most bands.  17 metres has been hopping most of the day.  I was able to work may European contries this morning and this afternoon was spent working US stations.

So far my modest efforts have yielded four continents, 27 states in the US and 29 unique countries.  Some of the guys here will work 24 hours a day so it seems, but I tend to go in spurts and then get involved in a project.

Middle of the afternoon one of our group came down to the gazebo to join me for a while and set up his gear.  When he powered up the 12V supply for his radio BOOM!  He apparently had been working so far from a 110V outlet and the gazebo is 220V only.  Oh sigh...  We opened up the supply but there had been a rather significant explosion in there and so he tossed it in the bin.  Apparently there is one or two of these that bite the dust in this way on very trip of the group down here.  I switched everything to 220V before I left home to avoid such nasties.  Oh well.

St. Lucia - Day Three

Last evening I was sitting out on the gazebo listening to the surf and watching a cruise ship wander by the north end of the island.  It is a lousy picture from a mobile phone, but you can get the idea.



I was able to extricate my gear from the authorities and before heading back to the villa, we had lunch on the beach.  The island has lots of dogs running around loose and there was an assortment of them hanging out under the tables looking for a handout.


After getting back to the villa I was able to quickly get on the air and make about 25 contacts in quick succession and later in the evening our wonderful villa hosts brought us a very fine Indian cuisine meal to cap off the evening.

Tuesday, December 6, 2016

St. Lucia - DX Map

Just a couple of us up early here on 40 metres right now.  This map gives a feeling for how we are doing 7.134 MHz.  Come on down and join the fun.  Right now J6/K0BBC is at the microphone.  Say hi to Matthew on 40 metres from me.



Monday, December 5, 2016

St. Lucia - day two

Today was a lot of antenna building, troubleshooting and for me a bit of frustration at the fact that my gear is still held prisoner by customs.  I am starting to adapt to "island time", but when trying to deal with government officials are very friendly and trying to help but offer to have the necessary individual call back when they come in, not being able to find the phone number I am using to talk to them, but they will figure it out, yadda, yadda...

So, frankly I am just happy to be here.  I have been so head-down for the last year to 1.5 years, it is just good to not be working and just trying to relax a bit.  I did get on 20 metres with a dipole antenna and a borrowed KX3 transceiver today and had fun collecting a couple dozen contacts, mostly in the states, but did get Spain and Canary Island as well.  It is fun being the station everyone is trying to work.  St. Lucia is not rare by any means, but does draw interest, so I enjoyed that process.

I did manage late in the afternoon to determine what the local officials needed from me in order to be able to release my gear from customs and they agreed to email me copies of the necessary paperwork.  My colleague that is in the same boat with one of his pieces of equipment finally got his updated paperwork submitted right at 16:54 (4:54pm) so he didn't hear back today.  Hopefully that will be at the top of this guy's in-box in the morning and we can finally go rescue the rest of my luggage.  So, I suspect much of tomorrow will be spent driving the length of the island twice.

We went shopping for food and supplies today for the eight of us and I about had a heart-attack when the bill was over ECD $750.00  (East Caribbean Dollars).  However, the exchange rate is about 2.7 to 1 so you basically get to divide that number by nearly 3 to see the actual cost in USD (US Dollars).

So, tomorrow looks like we should be on all bands except for 160 and 6 metres.  We ran into some problems getting an antenna up on 160 and 6 metres was the last priority for folks, but we have a small group working on it so I suspect we will be on all bands by end of day.

If you want to check out the villa we have for the week, you can read all about it at the website here.

So, I am enjoying hanging out on the deck listening to the surf.  We have a bit of wind tonight and it is a nice breeze.  If you want to work St. Lucia island tomorrow should be a good time to try it.  We usually spot on dx clusters as J6/homecallsign so our frequencies should be easy to find on web sites like http://dxsummit.fi.  Just search for J6 and you will find where we are hanging out.  Give us a call!

Sunday, December 4, 2016

St. Lucia - day one

Long red-eye flight out of Seattle to Atlanta Saturday night and then another 4 hour flight to Vieux Fort, St. Lucia BWI brought us to a beautiful 85 degree day on the island.  The pictures below are from a view point along the east side of St. Lucia where we stopped for a short break on the drive to the north end of the island.





By the time we got to the villa, the sun was setting, so some pictures of the venue will have to wait until tomorrow.

Dinner was supplied to all 8 operators by our hosts and we set about establishing antennas for 80, 40 and 30 metres.  We were able to collect 100 contacts as J6/K0BBC on  40 metres before retiring for the night.

On the downside, I had all of my equipment confiscated by St. Lucia customs at the airport as did one other operator.  We will attempt to sort out the issues tomorrow and retrieve the impounded equipment.  A further downside is that once the proper paperwork SNAFU has been sorted, we have to drive the length of the island again and back which will basically eat an entire day.  Oh sigh...

Friday, December 2, 2016

J6/KO7M - St. Lucia

Our license approval was granted yesterday (yay!) for operating on St. Lucia.  I will be operating as J6/KO7M.  Here is the rig I am taking:


We are still waiting on customs forms which hopefully will arrive today or else we may have a bit of a sit and wait when we arrive on Sunday.

I must admit I felt a little guilty sneaking off the the islands ahead of our first winter snow that is predicted for this week...  For about 19 nano-seconds...


Thursday, December 1, 2016

St. Lucia - DX News posting

Hey!  We made the ARRL DX news posting today!  See the "St. Lucia" listing below!  I will be operating at J6/KO7M.


SB DX @ ARL $ARLD049
ARLD049 DX news

ZCZC AE49
QST de W1AW
DX Bulletin 49  ARLD049
From ARRL Headquarters
Newington CT  December 1, 2016
To all radio amateurs

SB DX ARL ARLD049
ARLD049 DX news

This week's bulletin was made possible with information provided by
QRZ DX, the OPDX Bulletin, 425 DX News, The Daily DX, DXNL, Contest
Corral from QST and the ARRL Contest Calendar and WA7BNM web sites.
Thanks to all.

RODRIGUES ISLAND, 3B9.  Olaf, G0CKV is QRV as 3B9HA and is active
holiday style on the HF bands until December 12.  He is also usually
active on 160 and 80 meters around his local sunset from 1400 to
0100z.  QSL to M0OXO.

FIJI, 3D2.  Chris, VK3FY will be QRV as 3D3FY from December 6 to 14.
Activity will be holiday style on 80 to 10 meters using CW and SSB.
QSL via M0OXO.

MAURITANIA, 5T.  Vladimir, UA4WHX is QRV as 5T9VB from Nouakchott.
He is active on 80 to 10 meters using CW, SSB and RTTY.  His length
of stay is unknown.  QSL to home call.

TONGA, A3.  Hiro, JA6WFM is QRV as A31MM from Nuku'alofa until early
2017.  Activity is on 160 to 6 meters.  QSL via EA5GL.

CAPE VERDE, D4.  Larry, OH5XP and Zaba, OH1ZAA are QRV as D4X from
Sal Rei City on Boa Vista Island, IOTA AF-086, until December 5.
Activity is on 40, 30, 20 and 6 meters, and 70 MHz.  QSL via OH6GDX.

ANTARCTICA.  Francois, F4HLT is QRV as FT3YL from the Dumont
d'Urville Station on the Adelie Land group, IOTA AN-017.  Activity
is on 80 to 10 meters using mostly SSB.  His length of stay is
unknown.  QSL via F6KPQ.

SAINT MARTIN, FS.  Paul, K9NU, James, N9TK, John, W9ILY and John,
K9EL are QRV as FS/home calls until December 10.  Activity is on the
HF bands using CW, SSB and RTTY.  QSL to home calls.

ST. LUCIA, J6.  Operators W3FF, W6PNG, W6LDX, KI8R, K0BBC, WJ1B and
KO7M will be QRV as J6/home calls from December 4 to 12.  W3FF and
W6HFP will be QRV as J68FF and J68HF, respectively.  Activity will
be on 160 to 6 meters from various locations on the island.  QSL via
operators' instructions.

SLOVENIA, S5.  Special event station S509PMC is QRV during December
and January to call attention to the Peace Messenger City program.
QSL via S59DCD.

CRETE, SV9.  Members of the Radio Amateur Association of Chios are
QRV as SZ9/SZ8ARC/p from various locations on Crete until December
3.  QSL direct to SZ8ARC.

ANTARCTICA.  Oleg, ZS1OIN plans to be QRV as RI1ANA from the
Molodyozhnaya research station until April 2017.  Activity is on 160
to 10 meters.  QSL to home call.

KAZAKHSTAN, UN.  A number of stations are QRV in December with the
UP25 prefix to celebrate the 25th anniversary of Kazakhstan's
independence.  QSL via operators' instructions.

UKRAINE, UR.  Special event station EO25UD is QRV during December to
celebrate the 25th anniversary of UARL, the Ukrainian national ham
radio club.  QSL via UR7UD.

TURKS AND CAICOS ISLANDS, VP5.  Dave, W5CW is QRV as VP5/W5CW from
Providenciales, IOTA NA-002, until December 13.  Activity is on 160
to 6 meters using CW and SSB.  He plans to be active as VP5CW in the
ARRL 160 Meter contest and the upcoming ARRL 10 Meter contest.  QSL
direct to home call.

PRINCE EDWARD AND MARION ISLANDS, ZS8.  David, ZS1BCE is QRV as ZS8Z
from Marion Island, IOTA AF-021, until May 2018 while working as a
communications technician.  Activity is on the HF bands using SSB
and various digital modes when time permits.  QSL direct to ZS1LS.

THIS WEEKEND ON THE RADIO.  The ARRL 160-Meter Contest, NCCC RTTY
Sprint, QRP 80-Meter CW Fox Hunt, NCCC CW Sprint, TARA RTTY Melee,
Wake-Up QRP CW Sprint, TOPS Activity CW Contest, 10-Meter RTTY
Contest and the SARL Digital Contest are all on tap for this
upcoming weekend.

The ARS Spartan CW Sprint is scheduled for December 6.  The CWops
Mini-CWT CW Test, Phone Fray and QRP 40-Meter CW Fox Hunt are
scheduled for December 7.

Youngsters On The Air, YOTA, runs during the month of December.  A
number of stations with the YOTA suffix are active for the event.

The ARRL National Parks on the Air event runs during all of 2016 to
mark the 100th anniversary of the National Park Service.

Please see November QST, page 94 and the ARRL and WA7BNM Contest web
sites for details.
NNNN

/EX

Saturday, November 26, 2016

DX-pedition coming up in December

Well, a week from today, I am off to the British West Indies for a week or so of ham radio fun.  A group of 8 of us are headed to St. Lucia for a mini DX-pedition.  I will be operating 160 thru 6 metres as J6/KO7M.  Here is the email to DX News from the trip organizer, Budd Drummond W3FF.

On Nov 25, 2016, at 3:28 PM, Budd Drummond <w3ff@buddipole.com> wrote:

Travel plans are set for the 8th BIC ("Buddies in the Caribbean") mini-DXpedition to St Lucia (J6).  Eight operators, some of whom have never experienced the "other side" of a pileup, will be operating from Chateau Devaux on the NE side of St Lucia from December 4th through the 12th, 2016.

This suitcase DXpedition will operate QRP to 100 watt radio stations using Buddipole antennas to make contacts from the villa, the surrounding mountains, and (of course) from St Lucia's superb beaches.

The eight operators are:  Paul W6PNG,  Thom W6LDX, Mike KI8R, Matt K0BBC, Harold WJ1B,  Jeff KO7M, Chris J68HF (W6HFP) and Budd J68FF (W3FF).  Ops will preface their own US calls with J6/.

Team members will operate several CW, SSB and/or digital mode stations on 160-6 Meters from the villa while others make contacts with portable setups from remote J6 locations. 

Per tradition, meeting and operating with local hams while on J6 is one of our key goals. 

QSO confirmation and QSLs will be available via LOTW or direct via information on each operator's www.QRZ.com page.


Saturday, October 1, 2016

Updated Si570 code on GitHub

Well, I have finally updated my Si570 code on GitHub to reflect the changes to fix a bug found and blogged about over two years ago.  I described the fix here, but failed to follow through and update the code on GitHub with the changes.  Long past due, but glad to have that task off my TODO list.

Saturday, July 23, 2016

PID implementation experiences - UPDATED

I have posted previously about my experiences trying to implement a PID controller.  I am controlling linear faders that are motor driven from a remote device.  Movement of a control on the remote device results in the physical linear fader following that movement and the remote device following the fader when moved locally.

I have learned a number of things along the way.  I am new to control loop implementation and while the algorithms are well known and documented along with plenty of example code, the first thing I learned is that none of that helps you when it comes to tuning the operation of the PID in the specific environment in which it runs.

There are those among us that can describe in glorious detail the math behind all of the theory and implement MatLab simulations of motor transfer functions.  That, unfortunately does not describe me.  While I have a PhD, it is only in the school of "hard knocks" as my experience is my instructor.

Tuning PID control systems is as much art as science.  For a given fader (in my case) one could come up with PID tuning parameters by experimentation that would perform acceptably.  However, with the wide variance in acceptable performance from the manufacturers, it is a challenge to replicate that experience across an arbitrary number of faders from the same vendor.  My vendor for example specifies that the force required to move the fader is .8 newton which in and of itself is fine, just that the expected acceptable variance from this specification is plus and minus .5 newton.  Using a fader with specifications such as these is typical, but results in extreme difficulty when designing to have consistent results across multiple batches of the same fader model.  The variation in performance resulted in what initially looked like a 70% failure rate in being able to calibrate them.  However, my initial design failed to take into account the fact that the initial batch had very low friction profiles.  Comparing the experience to the datasheet, led me to conclude a different design (velocity PID) was required.

A number of desirable design elements are useful when designing control loops for motorized faders.

  1. Smooth movement
  2. Accurate positioning
  3. Stable movement without oscillation
  4. Able to accommodate a wide variance in friction profiles
  5. Able to accommodate fairly noisy signals measuring position of the fader
  6. Able to accommodate accurate measurement of movement velocity
  7. Sufficient MIPS available to provide tightly coupled feedback loops

My original implementation utilized a PID to control positioning the fader to one of 1024 positions.  The PID implementation included most of the fixes for typical PID controller issues which I have previously described.  It did a good job of positioning the fader to a give set point, quickly and fairly accurately.

Where it lacked robustness however was in dealing with changes in position that are very small and at an irregular arrival rate and rate of change.  Think of moving a control very slowly and sampling it's position on a 100-200 ms basis and using that as the set point for your PID.  Goal #1 above suffered greatly.  Attempts to tune this with three different sets of tuning parameters achieved reasonable results, but goal #4 was impossible to achieve with a positional PID alone.

The only way to achieve all of these goals was with a control loop that would set the fader moving in the right direction according to a motion profile and tightly control the velocity of the fader movement.  The control loop could apply as much or little force as necessary to keep the movement on the velocity profile desired.

There are (at least) a couple of standard forms of PID algorithms, one that works to control the position of something and the other to control the rate of change of something.  I found that I could use the first form (so called analogue PID) to control either in this case.  In the positional PID, I measured the position of the fader by reading the DC voltage across the fader potentiometer using an ADC.  The input to the PID was the current ADC value read from the fader.  The PID would compute the necessary PWM output to drive the motor to the desired position.

In the case of the velocity PID, I kept a history of fader positions over a 5 ms period.  The position is calculated every 250 us.  The difference between the newest and the oldest position samples provided a velocity with sufficient granularity to be useful.  This velocity value (current velocity) was used as the input to the velocity PID.  The calculated PWM output value was use to drive the motor to adjust the movement to the desired velocity regardless of varying friction, voltages, etc.

A couple of traps in implementing the vPID (or for that matter, any PID).  When tuning, you should always start very non-aggressively and only change one thing at a time.  General tips:

  1. There are hundreds of white papers, publications, youtube videos and the like that describe the process of PID tuning in excruciating detail.  They are all useful.  Everyone's learning style is different, so use what works for you and toss the rest.
  2. The proportional gain (Kp) value should be chosen to quickly produce the necessary output PWM value to get you moving in the right direction.  Consider the approximate PWM value necessary to move the motor and the estimated maximum velocity error possible when choosing this value.  Best to experiment with a too high value and back it off appropriately.  The Kp value should kick your motor into action without creating oscillation.
  3. The correct direction to move is determined by the sign of the positional error.  (desired position - actual position).  If negative you move one direction, otherwise you move the other direction.
  4. The integral gain (Ki) value will want to accumulate errors in velocity fairly quickly and so it will likely be greater than Kp.  You want accumulating error to be made up in acceleration quickly.  Otherwise, your faders will lag both in acceleration and deceleration.  Dialing this value up too high will result in overshooting and oscillation.
  5. The derivative gain (Kd) value will likely be unused in a velocity PID.  The presence of noise on the ADC readings is greatly amplified by increasing the Kd value.  In my case there is about 30 mv of variance in position calculations for a fader that is not moving.  The fact that the fader is 100 mm long and has 1024 positions means that a change in position of one results in a 48 uV change.  So, changes in position of 10 or less will be lost in the noise.  Sounds like a lot, but 10 positions (out of 1024) on a 100 mm fader is a change in position of about 1 mm.  In my experience even with signal processing techniques applied to the ADC value, increasing the Kd value above 1.0 resulted in severe oscillation of the fader.  In the end, I set this term to 0.0 disabling it.  In a positional PID I found this term to be very useful for flattening out ringing around the positional set point.  For velocity, not so much.
One area that is not discussed as much in the various resources available is the importance of not only controlling the velocity, but having the decision about what the desired velocity is be able to change as appropriate.  For example, one could merely state that when faders move, they always move at a single constant velocity.  This is perhaps a too simple solution.  Single set point movements (from A to B) occurring infrequently, this may well be sufficient. Tiny incremental changes you end up with overshooting and backing up (overshooting again) etc.  What is necessary is a motion profile that will decide what the velocity should be for a given movement.  This can be as complex or simple as will meet your needs.

In my case, I allow the PID tuning to dictate how rapidly the fader is accelerated and the maximum velocity allowed is the set point for the vPID.  To determine that set point, I chose to use the distance to the positional set point to determine the velocity.  Basically, the further we have to travel, the faster we will go (up to a maximum limit) and then as we approach the set point, we slow down on that same profile.  It ends up looking something like this:


This represents three different deceleration profiles that were tried.  The blue line represents my original design where up at the top of the graph, we are cruising along at the maximum velocity.  As we get close to the target, we begin to decelerate at an initial rate and at the end we increase the rate of deceleration until we stop.

Due to the inherent delays involved in filtering the ADC values, I found that with this profile, I was consistently overshooting my set point position.  The amount of overshoot was proportional to the length of the move.  Flattening out the curve slightly as seen in the red line, improved the overshoot condition, but not sufficiently.  In the end, my profile looks like the yellow line where we begin decelerating a little sooner and decrease the velocity at a slower rate approaching the set point.  This has allowed me to accurately position faders and meet all of the requirements above.

There are other details that require attending to.  Most DC motor controller chips have the ability to apply a braking action to the motor movement.  When coming to a stop, you should definitely apply the braking action.  However, be careful that you do not release the brakes too soon.  There is a fair amount of inertia in the system and these motors don't stop on a dime.  The actual stopping time is a function of the velocity, mass and friction profile.  For the simple minded among us (me) this translates into something other than a brake tap.  I apply the brakes when in range of where I want to stop plus or minus some delta and then hold them, in my case for about 4 ms before releasing.  Without this action, overshooting is a very real problem.

So with a 250 us cycle of determining the position, keeping 5 ms of positional history to measure the velocity and applying the new PWM value to the motor resulted in very smooth and precise operation.  Reducing the fader update rate to 1 ms was also very nice with small steps in position being only slightly more apparent.

I have initially implemented this on a 120 MHz Cortex M4 processor that supports floating point hardware.  Now that I have the implementation details worked out, I will be experimenting with simplified fixed point implementations on Arduino hardware and will of course post my code for that as it develops.