Synchronizing Engine and Motor for a Hybrid Car

I have a project in which a four wheel drive car has rear wheels driven by an engine and front wheels driven by a motor.
I am using an arduino to synch the speeds of the front and rear axles.
The wheel speed sensors give output as pulses. Measuring the speed of the engine i have to control the speed of the motor. The motor controller input is 0-5V.

Can any one help me with this or suggest some functions that I can use.

Thank You.

Surely the fact that the front and back wheels are both on the ground will synchronise the speeds, won't it?

I think that you need to monitor the direction of current flow, to determine whether the motor is acting as a motor or a generator.
In fact there are times, such as during breaking when it acting as a generator will be useful.

What proportion of the drive do you want to come from each source? Is it always the same, or does it need to vary in some way due to driving conditions?

Perhaps you should consider torque control - sense motor current and control that with a feedback
loop, they you basically control torque and not speed.

MarkT:
Perhaps you should consider torque control - sense motor current and control that with a feedback
loop, they you basically control torque and not speed.

Yes. I though that too, but I wasn't sure how you would implement it.

I believe that electric bicycles somehow monitor the torque produced by pedaling to control the motor.

In short feedback loop, current sensor -> PID controller -> PWM.