Vertical position is:
$$
y = A \sin{(\omega t)}
$$
If your frequency is 20Hz, your angular frequency is $2\pi f$, or 125.66 rad/s.
If your max vertical motion is 30cm, then you could say it's 15cm +/- 15cm, so your amplitude is 15cm = 0.15m.
Now your position is given by:
$$
y = 0.15 * \sin{(125.66 t)} \\
$$
So, first derivative, your speed is given by (chain rule):
$$
\array{
dy/dt = & 0.15* (\cos{(125.66 t)} * 125.66) \\
dy/dt = & 18.85 \cos{(125.66 t)}}
$$
So, second derivative, do the chain rule again:
$$
\array{
d^2y/dt^2 = & 18.85 * (-\sin{(125.66t)} * 125.66) \\
d^2y/dt^2 = &-2368.6 \sin{(125.66t)}}
$$
The line above is the second derivative of position, a.k.a. acceleration. As $F = ma$, and the max value of $-\sin{(\mbox{stuff})} = 1$, this gives you a peak acceleration of $2368.6 m/s^2$. If gravitational acceleration is $9.81 m/s^2$ (it is), then you are looking at a peak acceleration of $2368.6/9.81 = 241\mbox{g's}$.
Going back to the $m/s^2$ definition of your peak acceleration, you're looking at a force of $F = (2368.6 m/s^2)(6kg)$, or 14,211 Newtons, or 3,194 lbf.
Now, if you are interested in the power required to do this, that's force times speed. Because you get peak force when speed is zero and vice versa, let's just multiply the equations together and work from there, as peak power is going to happen somewhere in between peak force and peak speed. And again, since these are sine and cosine, we can drop the negative because it's absolute values we're concerned with:
$$
\array{
P = & F*(dy/dt) \\
P = & (6*2368.6 \sin{(125.66t)} N)(18.85 \cos{(125.66 t)} m/s) \\
}
$$
Rearrange, and then use the double-angle formula $\sin{(2\theta)} = 2\cos{\theta}\sin{\theta}$:
$$
\array{
P = & 267,894 \sin{(125.66t)}\cos{(125.66t)} \\
P = & 133,947 \sin{(2 * (125.66 t)} (Nm/s)\\
}
$$
And again, here the peak value of $\sin{(\mbox{stuff})} = 1$, so the peak power you're going to require is $P = 133,947 Nm/s$, or
$$\boxed{P = 134 \mbox{kW}}\\$$
If you think of the peak power as $P_p = V_p * I_p$, then you could consider RMS power as $P_{\mbox{rms}} = \frac{V_p}{\sqrt{2}}\frac{I_p}{\sqrt{2}}$, or $P_{\mbox{rms}} = P_p/2$.
So, going this route, if your home electrical service is 120VAC, then you're looking at drawing:
$$
I = P/V = (134,000/2)/120\\
I = 558A
$$
To put this into perspective, your home probably has "100 amp service", meaning that if you added all of the circuits in your house together you could only get 100A combined - you're trying to draw all the power available to a block. The breakers in your house are probably rated for 15A each, though, so this would blow the circuit well before you ever got close to what you're asking for. Also the motor would burn up. And the clutch.
--EDIT--
After getting back to my computer, I set up a spreadsheet with the above equations to run through some different scenarios. I found a math error this way - I had left off mass in the power equation $P = Fv$, or $P = mav$. What I calculated was just $P = av$, which is incorrect. It threw my numbers off by a factor of , which was 6 in this case, so where I thought you were drawing 93A at 120VAC you are actually drawing 558A.
Anyways, if you lower your frequency from 20Hz to 5Hz, then your power requirement drops from 67kW, or 90HP - about the output power of an economy class sedan, to 1kW, or about 1.4HP. This would have you drawing about 8.7A at 120VAC, which is entirely within the realm of possibilities for actual implementation.
Now, with a reasonable set of specifications, you can go hunting for applicable actuators. At this point, your "general question without many specific parameters" is too vague to give much guidance beyond some broad categories. For instance, I would hope you have considered how the following plays into your decision:
- Cost
- Positional accuracy
- Complexity
- Noise
Those are the things I would consider, in approximately that order of priority. Once you set a budget for what you are (and are not) willing to spend, then that should weed out a lot of actuators. Beyond that, your positional accuracy should then seal the deal. You said you didn't want to use pneumatics because "they are too imprecise", but you have not stated how precise you want your positioning to be.
I have actually used this controller before for some relatively fine position control, but that controller is about \$900, and you still need to buy the cylinder (probably about \$100) and a suitable air compressor (maybe \$150-\$200), and pneumatic hose and fittings.
You could use hydraulics, but that requires a hydraulic power unit (~\$400), a position regulator (~\$100), and then the cylinder (~\$100) and the hydraulic hose and fittings, which are likely to be considerably more expensive than pneumatic hose and pneumatic fittings.
You could use electric linear actuators, but those are typically much slower. At 5Hz, for a +/- 15cm stroke, you're looking at a top speed of 4.7 m/s. This "high speed" linear actuator moves at 4.5 inches per second, or about 0.11m/s, which would correspond to a frequency of about 0.1Hz for you - one cycle every ten seconds instead of five cycles every second.
All of the above are linear actuators. You can go with a motor (probably would be my choice), but as you mentioned this will require a cam/lever/crank system to convert the rotary motion to linear motion. Electric motors rated for 1.5HP or 1kW should be pretty easy to find, I would guess for about \$150 or so, but you'd still need a motor controller, which could easily run \$250-\$500, and then, if you care about position, you would need a position encoder for the motor.
It all gets pretty costly pretty quickly, which I know is a frustrating answer, but that's engineering.
So, to recap: first, set a budget. As in most things, this should significantly narrow the scope of what's feasible for you.